Reputation: 8361
Oracle changed the release schedule for their database, announcing that version 12.2.0.2 will be called "Oracle Database 18c."
What is the version number of the database, 12.2.0.2 or 18.x.x.x?
Upvotes: 0
Views: 3018
Reputation: 21
If we can connect to the database, then the simplest way to find the Oracle version and edition is to query the V$Version view, using the following syntax:
SELECT BANNER, BANNER_FULL FROM v$version;
The banner column will display the edition and the “base” version (18.0.0.0, 19.0.0.0 or 21.0.0.0) and the banner_full column (introduced in Oracle 18c) will display the full release information.
SELECT * FROM PRODUCT_COMPONENT_VERSION;
SELECT version FROM V$INSTANCE;
BEGIN DBMS_OUTPUT.PUT_LINE(DBMS_DB_VERSION.VERSION || '.' || DBMS_DB_VERSION.RELEASE); END;
Upvotes: 0
Reputation: 5298
Internally 18c identifies itself as version 18.
On API level:
$ cat /u01/app/oracle/product/18.1.0.0/dbhome_1/rdbms/public/ociver.h
#ifndef OCIVER_ORACLE
#define OCIVER_ORACLE
#define OCI_MAJOR_VERSION 18 /* Major release version */
#define OCI_MINOR_VERSION 0 /* Minor release version */
#endif
And also on SQL level:
SQL> SELECT VERSION FROM PRODUCT_COMPONENT_VERSION;
VERSION
----------
18.0.0.0.0
And also on JDBC level:
java -jar /u01/app/18.1.0.0/grid/jdbc/lib/ojdbc8.jar
Oracle 18.0.0.0.0 JDBC 4.2 compiled with javac 1.8.0_152 on Wed_Dec_06_05:42:32_PST_2017
#Default Connection Properties Resource
#Thu May 31 12:52:24 CEST 2018
Upvotes: 3
Reputation: 8361
Ah, found it, the database is not yet available for download, but livesql says
SELECT * FROM v$version;
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
EDIT: Hmm, the documentation for 18c is online, but it refers in the text to 12c, for instance
46.2 DBMS_DB_VERSION Constants
The Oracle Database 12c Release 2 version of the DBMS_DB_VERSION package uses the constants shown in the following table.
Upvotes: 0