Here are some ways to check Oracle database version –
PRODUCT_COMPONENT_VERSION –
PRODUCT_COMPONENT_VERSION is data dictionary view provides PRODUCT information like Enterprise or Standard or Express editions, VERSION provides actual base version of Oracle database, VERSION_FULL provides with latest Release update & STATUS information of the database.
set linesize 999;
col STATUS format A10;
col VERSION format A10;
col PRODUCT format A40;
col VERSION_FULL format A20;
select * from PRODUCT_COMPONENT_VERSION;
set linesize 9999;
col STATUS format A10;
col VERSION format A10;
col PRODUCT format A40;
col VERSION_FULL format A20;
select * from PRODUCT_COMPONENT_VERSION;
PRODUCT VERSION VERSION_FULL STATUS
---------------------------------------- ---------- -------------------- ----------
Oracle Database 21c Express Edition 21.0.0.0.0 21.3.0.0.0 Production
V$VERSION –
V$VERSION columns BANNER, BANNER_LEGACY columns display component and version details, BANNER_FULL column displays database release and version, CON_ID displays container id.
SQL> select BANNER_FULL from V$VERSION;
BANNER_FULL
------------------------------------------------------------------------------
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
DBMS_DB_VERSION Package –
DBMS_DB_VERSION Package is an another option of checking version.
SQL> set serveroutput on;
SQL> EXEC DBMS_OUTPUT.PUT_LINE('Oracle Database - '||DBMS_DB_VERSION.VERSION||'.'||DBMS_DB_VERSION.RELEASE);
Oracle Database - 21.0
PL/SQL procedure successfully completed.
SQL>
V$INSTANCE –
VERSION, VERSION_LEGACY Columns of GV$INSTANCE displays database version. VERSION_FULL column displays Oracle Database Version scheme introduced in Oracle database 18c.