Determine installed version of oracle DB

Learn how to check the installed version of oracle Database with example queries.

Below are the queries to know the release version of oracle database that is currently installed in your PC.

Query 1: All Version Information using v$version

To retrieve all version information from Oracle, you could execute the following SQL statement:

SELECT * FROM v$version;

S.N.BANNERCON_ID
1Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production0
2PL/SQL Release 12.1.0.2.0 – Production0
3CORE 12.1.0.2.0 Production0
4TNS for IBM/AIX RISC System/6000: Version 12.1.0.2.0 – Production0
5NLSRTL Version 12.1.0.2.0 – Production0

V$VERSION displays version numbers of core library components in Oracle.

Query 2: details of the current database instance using V$INSTANCE table

SELECT version FROM V$INSTANCE

VERSION
112.1.0.2.0

V$INSTANCE shows details of the current database instance such as host name, startup time, status, etc. The column VERSION in V$INSTANCE contains the database version.

SELECT * FROM V$INSTANCE

INSTANCE_NUMBERINSTANCE_NAMEHOST_NAMEVERSIONSTARTUP_TIMESTATUSPARALLELTHREAD#ARCHIVERLOG_SWITCH_WAITLOGINSSHUTDOWN_PENDINGDATABASE_STATUSINSTANCE_ROLEACTIVE_STATUSBLOCKEDCON_IDINSTANCE_MODEEDITIONFAMILY
11databaseIJPRIBME850-09-CL6-REVUAT12.1.0.2.012/5/2018 7:58:04 PMOPENNO1STOPPEDALLOWEDNOACTIVEPRIMARY_INSTANCENORMALNO0REGULAREE

DBMS_DB_VERSION

The package contains two constants that specify the database version and release number. They are:

dbms_db_version.version
dbms_db_version.release

Query 3: details of the current database version and release.

BEGIN 
	DBMS_OUTPUT.PUT_LINE(DBMS_DB_VERSION.VERSION || '.' || DBMS_DB_VERSION.RELEASE); 
END;

Output
12.1

Related Posts