ITPub博客

首页 > 数据库 > Oracle > [20191125]18c oraversion.txt

[20191125]18c oraversion.txt

原创 Oracle 作者:lfree 时间:2019-11-25 08:50:33 0 删除 编辑

[20191125]18c oraversion.txt

--//18c提供使用程序显示oracle版本号.有时候显示测试环境需要,12c以上查询v$version输出有点长.
--//简单做一个记录:

$ oraversion
This program prints release version information.
These are its possible arguments:
-compositeVersion: Print the full version number: a.b.c.d.e.
-baseVersion: Print the base version number: a.0.0.0.0.
-majorVersion: Print the major version number: a.
-buildStamp: Print the date/time associated with the build.
-buildDescription: Print a description of the build.
-help: Print this message.

--//各个参数输出如下:

$ oraversion | grep "^-[^h]" | cut -f1 -d: | xargs -IQ bash -c "echo -n  Q =  ; oraversion Q "
-compositeVersion =18.3.0.0.0
-baseVersion =18.0.0.0.0
-majorVersion =18
-buildStamp =180628094320
-buildDescription =Release_Update

--//也可以将参数连在一起:
$ oraversion | grep "^-[^h]" | cut -f1 -d: | paste -sd" " | xargs -IQ bash -c "oraversion Q"
18.3.0.0.0
18.0.0.0.0
18
180628094320
Release_Update

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2665494/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969329