advertisements
_____________________________________________________________________________________________________________________
Method 1: Sqlplus startup
If you are using the sqlplus from server it will show the version of the Oracle and if you are trying it from the client machine which will show you the Oracle client installed on the machine.
example
$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Sep 6 11:32:28 2011
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Method 2 using DBMS_DB_VERSION
SQL> SET SERVEROUT ON
SQL> EXEC DBMS_OUTPUT.PUT_LINE (DBMS_DB_VERSION.VERSION);
11
SQL> EXEC DBMS_OUTPUT.PUT_LINE (DBMS_DB_VERSION.release);
1
Method 3 V$session view
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 – Production
Method 4 Using opatch Utility
$ opatch lsinventory
Invoking OPatch 11.1.0.6.2
Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /lh7/oracle/product/11.1.0
Central Inventory : /lh7/oracle/product/11.1.0/inventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 11.1.0.6.2
OUI version : 11.1.0.7.0
OUI location : /lh7/oracle/product/11.1.0/oui
Method 5 Using strings command
$ strings $ORACLE_HOME/bin/oracle | grep NLSRTL
NLSRTL Version 11.1.0.7.0 - Production
Method 6 using DBMS_UTILITY.db_version
SET SERVEROUTPUT ON
DECLARE
l_version VARCHAR2(100);
l_compatibility VARCHAR2(100);
BEGIN
DBMS_UTILITY.db_version (version => l_version,
compatibility => l_compatibility);
DBMS_OUTPUT.put_line('Version: ' || l_version || ' Compatibility: ' || l_compatibility);
END;
/
Version: 11.1.0.7.0 Compatibility: 11.1.0.7
PL/SQL procedure successfully completed.
_____________________________________________________________________________________________________________________
0 comments:
Post a Comment