工作当中有时候想查看一下数据库的具体版本号,这里简单整理了一下,可以通过:dba_server_registry、dba_registry_history、product_component_version、v$version视图查看,另外还可以通过Oracle Opatch命令查询具体的补丁版本
1、查询dba_server_registry视图
SQL> select comp_name,version from dba_server_registry;
COMP_NAME VERSION
-------------------------------------------------------------------------------- --------------
Oracle Application Express 3.2.0.00.27
Oracle XML Database 10.2.0.4.0
Oracle Text 10.2.0.4.0
Oracle Enterprise Manager 10.2.0.4.0
Oracle Workspace Manager 10.2.0.4.3
Oracle Database Catalog Views 10.2.0.4.0
Oracle Database Packages and Types 10.2.0.4.0
7 rows selected
2、查询dba_registry_history
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS
-------------------------------------------------------------------------------- ------------------
14-7月 -08 05.24.02.895660 下午 UPGRADE SERVER 10.2.0.4.0 Upgraded from 10.2.0.3.0
3、查询product_component_version视图
SQL> select product,version from product_component_version;
PRODUCT VERSION
--------------------------------------------------------------------------------
NLSRTL 10.2.0.4.0
Oracle Database 10g Enterprise Edition 10.2.0.4.0
PL/SQL 10.2.0.4.0
TNS for HPUX: 10.2.0.4.0
4、查询v$version视图
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
5、利用Opatch命令进行查看具体的补丁有哪些
$opatch lsinventory -detail -oh $CRS_HOME
$opatch lsinventory -detail -oh $RDBMS_HOME
使用“-help”参数可以获得opatch命令的帮助信息
[oracle@ora OPatch]$ ./opatch -help
Usage: opatch [ -help ] [ -r[eport] ] [ command ]
command := apply
lsinventory
prereq
query
rollback
util
version
:= -help Displays the help message for the command.
-report Print the actions without executing.
example:
'opatch -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch prereq -help'
'opatch rollback -help'
'opatch util -help'
[oracle@ora OPatch]$ ./opatch lsinventory -h
DESCRIPTION
List the inventory for a particular $ORACLE_HOME or display all
installations that can be found.
SYNTAX
opatch lsinventory [-all ] [-all_nodes] [-delay
] [-detail ]
[-invPtrLoc ] [-jre ]
[-oh] [-oh ] [-patch]
[-ptlConnect ]
[-ptlPassword ]
[-ptlSchema ]
[-property_file ]
[-retry ]
OPTIONS
-all
Report the name and installation directory for each
$ORACLE_HOME found.
-all_nodes
Reports the patches installed on the given Oracle Home
in all nodes of the RAC system. It also prints the oracle
binary's size and checksum on all nodes. This option cannot
be used in conjunction with -all, -detail, -patch.
-delay
If -retry is specified, this option tells OPatch how
many seconds it should wait before attempting to lock
inventory again in case of a previous failure.
-detail(s)
Report installed products and other details. This
option cannot be used in conjunction with all option.
-invPtrLoc
Used to locate the oraInst.loc file. When the
installation used the invPtrLoc flag. This should be
the path to the oraInst.loc file
-jre
This option tells OPatch to use JRE (java) from the
specified location instead of the default location
under Oracle Home
-oh
The oracle home to work on. This takes precedence over
the environment variable ORACLE_HOME
-patch
Lists the patch IDs installed in the oracle home
-ptlConnect
This option is used to specify the connect string credentials
of the portal schema
-ptlPassword
This option is used to specify the password of the portal
schema
-ptlSchema
This option is used to specify the schema of the portal
repository
-property_file
The user defined property file for OPatch to use. The
path to the property file should be absolute. This
property file takes precedence over the one that is
supplied with OPatch
-retry
This option tells OPatch how many times it should
retry in case of an inventory lock failure
PARAMETERS
This operation does not have any required parameters.
阅读(27256) | 评论(0) | 转发(0) |