techxplore blog
21Mar

Check Oracle Database Version and Release Number in Linux

IT support has no borders. It spans across countries and continents. Our development team was from India which supports application. As a sysdba, I was asked some information about our Oracle Database running Redhat Linux. Specifically, they would like to know the Oracle Database version and release number. It’s needed somehow to recreate the application software database for testing and debugging.

So, how do you get the Oracle Database version and release number in Linux? This could be done with the use of a simple SQL query on the database itself. You need to login with DBA access on the database and query from the v$version table.

SQL command to check Oracle Database version and release number:
select banner from v$version;

Here’s a text sample of running of the command:
SQL> select banner from v$version;
BANNER
-----------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
PL/SQL Release 9.2.0.7.0 - Production
CORE 9.2.0.7.0 Production
TNS for Linux: Version 9.2.0.7.0 - Production
NLSRTL Version 9.2.0.7.0 - Production

Here’s a sample result of running the command for Oracle Database 9i.

Check Oracle Database Version and Release 9i on Linux

Check Oracle Database Version and Release 9i on Linux

Here’s a sample result of running the command for Oracle Database 10g.

Check Oracle Database Version and Release 10g on Linux

Check Oracle Database Version and Release 10g on Linux

Some have been use to using the old syntax which is as follows:
SELECT * FROM sys.SM_$VERSION;
Sad to say that it is not used anymore as it shows wrong information.

Here’s the result of running the old syntax.

Oracle Version and Release Check Old Way

Oracle Version and Release Check Old Way

It could be noted that the old syntax shows a fixed result for the version number. It’s only the create date which changes in value. Thus, definitely it’s not useful and worst erroneous. Accurate and correct checking of the Oracle Database version and release number should come from doing a query on the v$version table.

Leave a Reply