我们在接手企业的产品数据库时首先总是要了解一下数据库的版本、版本号等信息。
Oracle数据库软件根据用户不同的需求分成多种版本(Database Edition),它们分为:
Oracle Database Standard Edition One :delivers unprecedented ease of use, power, and performance for workgroup, department-level, and Web applications. From single-server environments for small business to highly distributed branch environments, Oracle Database Standard Edition One includes all the facilities necessary to build business-critical applications.
Oracle Database Standard Edition:delivers the unprecedented ease of use, power, and performance of Standard Edition One, with support for larger machines and clustering of services with Real Application Clusters. Real Application Clusters is not included in the Standard Edition of releases prior to Oracle Database 10g, nor is it an available option with those earlier releases.
Oracle Database Enterprise Edition: provides the performance, availability, scalability, and security required for mission-critical applications such as high-volume online transaction processing (OLTP) applications, query-intensive data warehouses, and demanding Internet applications. Oracle Database Enterprise Edition contains all of the components of Oracle Database, and can be further enhanced with the purchase of the options and packs described in Chapter 2, “Options and Packs”.
Oracle Database Personal Edition: supports single-user development and deployment environments that require full compatibility with Oracle Database Standard Edition One, Oracle Database Standard Edition, and Oracle Database Enterprise Edition.
Personal Edition includes all of the components that are included with Enterprise Edition, as well as all of the options that are available with Enterprise Edition, with the exception of the Oracle Real Application Clusters option, which cannot be used with Personal Edition. Personal Edition is available on Windows 2000, Windows NT, Windows XP, and Windows Server 2003 (32-bit and 64-bit versions). The Management Packs are not included in Personal Edition.
关于EE、SE、Personal 各版本之间的具体差异可以参考Mos Note<FAQ: Differences Between Enterprise, Standard and Personal Editions [ID 465455.1]>。
这里我们要具体介绍的识别现有安装的Oracle数据库软件是Enterprise Edition、还是Standard Edition或其他版本的几种方法:
方法1:使用SQLPLUS产生banner信息
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 27 20:58:38 2011
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select * from global_name;
GLOBAL_NAME
------------------------------------------------------
www.askmac.cn & www.askmac.cn
方法2:查询v$version 获取banner信息
SQL> select * from v$version where rownum=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
方法3:查询告警日志alert.log中的启动信息:
cat alert_VPROD1.log |grep Edition|uniq -u
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
方法4:查询udump或bdump目录下trace文件的头部也可以获得Database Edition信息:
[oracle@vrh1 trace]$ head -10 VPROD1_lmhb_9336.trc
Trace file /s01/orabase/diag/rdbms/vprod/VPROD1/trace/VPROD1_lmhb_9336.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /s01/orabase/product/11.2.0/dbhome_3
System name: Linux
Node name: vrh1.oracle.com
Release: 2.6.18-274.el5
Version: #1 SMP Mon Jul 25 13:17:49 EDT 2011
Machine: x86_64
方法5:在Windows平台上可以从注册表的ORACLE_BUNDLE_NAME了解:
方法6:若Oracle RDBMS软件的原始安装日志仍保留着,那么可以从日志中找到安装的Database Edition:
EE: [oracle@rh2 ~]$ cd $ORACLE_HOME/cfgtoollogs/oui [oracle@rh2 oui]$ cat installActions2011-03-29_10-54-40PM.log|grep -i "Database Edition" INFO: Database Edition selected: EE - Database edition : Enterprise Edition (Install database software only) SE: [maclean@vbase ~]$ cd /s01/orabase/product/11.2.0/dbhome_1/cfgtoollogs/oui [maclean@vbase oui]$ ls -ltr total 2608 -rw-rw----. 1 maclean maclean 113 Sep 27 19:35 oraInstall2011-09-27_07-29-17PM.out -rw-rw----. 1 maclean maclean 0 Sep 27 19:35 oraInstall2011-09-27_07-29-17PM.err -rw-rw----. 1 maclean maclean 2663801 Sep 27 19:38 installActions2011-09-27_07-29-17PM.log [maclean@vbase oui]$ cat installActions2011-09-27_07-29-17PM.log |grep -i "Database Edition" INFO: INFO: Database Edition selected: STD INFO: - Database edition : Standard Edition (Install database software only)
方法7:$ORACLE_HOME/lib/lib/libvsn*共享库文件中存有”Database Edition”信息,可以利用该so文件帮助确认是EE还是SE:
EE: [oracle@rh2 ~]$ ls -l $ORACLE_HOME/lib/libvsn* -rw-r--r-- 1 oracle oinstall 3074 Mar 11 2008 /s01/db_1/lib/libvsn10.a -rw-r--r-- 1 oracle oinstall 3050 Mar 11 2008 /s01/db_1/lib/libvsn10_std.a.dbl [oracle@rh2 ~]$ strings /s01/db_1/lib/libvsn10.a|grep -i "release" Oracle Database 10g Enterprise Edition Release %d.%d.%d.%d.%d %s SE: [maclean@vbase dbhome_1]$ ls -l $ORACLE_HOME/lib/libvsn* -rw-r--r--. 1 maclean maclean 8438 Sep 17 08:26 lib/libvsn11.a -rw-r--r--. 1 maclean maclean 8494 Sep 17 08:26 lib/libvsn11_ee.a.dbl [maclean@vbase dbhome_1]$ strings lib/libvsn11.a|grep -i "release" Oracle Database 11g Release %d.%d.%d.%d.%d %s /* 没有Enterprise Edition说明是Standard Edition */
方法8:如果做过RDA,那么RDA报告中会记录RDBMS软件是Enterprise Edition或Standard Edition
方法9: 仅针对10g r1/r2有效,通过”$ORACLE_HOME/inventory/Components21/oracle.server/$VERSION/content.xml” inventory库信息文件可以定位oracle.server是Enterprise Edition或Standard Edition:
cat /s01/db_1/inventory/Components21/oracle.server/10.2.0.1.0/context.xml |grep "s_serverInstallType"
<VAR NAME="s_serverInstallType" TYPE="String" DESC_RES_ID="s_serverInstallType_DESC"
SECURE="F"
VAL="EE" ADV="F" CLONABLE="F" USER_INPUT="CALC"/>
<CONST NAME="s_serverInstallType_DESC" PLAT_SP="F" TYPE="String" TRANS="F"
VAL="This variable is used to determine which database configuration was chosen
by the user and will be passed down to rdbms-dbca"/>
这里的VAL="EE"说明是Enterprise Edition
如果是VAL="SE"则说明为Standard Edition
注意该方法仅对10g有效
方法10: 仅针对11g 有效,通过$ORACLE_HOME/inventory/response库目录下的response文件帮助确认:
EE cd $ORACLE_HOME/inventory/response [oracle@vrh1 response]$ ls -l total 76 -rw-rw---- 1 oracle oinstall 24992 Sep 17 09:26 db_install.rsp -rw-rw---- 1 oracle oinstall 46530 Sep 24 23:31 oracle.server_EE.rsp [oracle@vrh1 response]$ cat oracle.server*.rsp|grep INSTALL_TYPE #Name : INSTALL_TYPE INSTALL_TYPE="Enterprise Edition" SE: cd $ORACLE_HOME/inventory/response [maclean@vbase response]$ ls -ltr total 76 -rw-rw----. 1 maclean maclean 24992 Sep 17 09:26 db_install.rsp -rw-rw----. 1 maclean maclean 46485 Sep 27 19:36 oracle.server_SE.rsp [maclean@vbase response]$ cat oracle.server_SE.rsp |grep INSTALL_TYPE #Name : INSTALL_TYPE INSTALL_TYPE="Standard Edition"
相信以上介绍的10种方法总有一种可以满足你的需求, just enjoy it !
Leave a Reply