I am in terminal in Redhat 5.5 and I need to find out which version of Oracle is installed. I am pretty new at Linux, but I have searched Google for a while and I can't find what I need. I have to locate which version is installed via terminal. I found the Oracle files, but I can't seem to find the version.
-
4Can you connect to the oracle DB? if so, just run `select * from v$version;` – A.B.Cade Jun 04 '12 at 14:30
7 Answers
Enter in sqlplus (you'll see the version number)
# su - oracle
oracle# sqlplus
OR
echo $ORAHOME
Will give you the path where Oracle installed and path will include version number.
OR
Connect to Oracle DB and run
select * from v$version where banner like 'oracle%';

- 76,197
- 13
- 71
- 125
-
First off thanks for your reply. I got into the Oracle file, and ran ls. The list of files are 'bea emkey.ora glibc-devel-2.5-49.i386.rpm oradiag_oracle' does one of those contain the Oracle version? – PolarisUser Jun 04 '12 at 14:52
-
It's enough to login to SQL*Plus and version is printed to the output. – BlueLettuce16 Mar 01 '13 at 09:29
-
1idk of previous versions, but in 11g the condition would be: "where banner like 'Oracle%' since the result is: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production – DeiAndrei Oct 06 '16 at 13:18
As the user running the Oracle Database one can also try $ORACLE_HOME/OPatch/opatch lsinventory
which shows the exact version and patches installed.
For example this is a quick oneliner which should only return the version number:
$ORACLE_HOME/OPatch/opatch lsinventory | awk '/^Oracle Database/ {print $NF}'

- 365
- 3
- 5
-
1It is remarkable hard to find out the actual patch level. lsinventory is the best approach. You might want to add -bugs_fixed. On the PSU level you can use `select comments, version, bundle_series from sys.registry$history where bundle_series = 'PSU' order by action_time;` – eckes Feb 23 '15 at 19:19
As A.B.Cada pointed out, you can query the database itself with sqlplus for the db version. That is the easiest way to findout what is the version of the db that is actively running. If there is more than one you will have to set the oracle_sid appropriately and run the query against each instance.
You can view /etc/oratab file to see what instance and what db home is used per instance. Its possible to have multiple version of oracle installed per server as well as multiple instances. The /etc/oratab file will list all instances and db home. From with the oracle db home you can run "opatch lsinventory" to find out what exaction version of the db is installed as well as any patches applied to that db installation.

- 1,734
- 11
- 6
I solved this in about 1 minute by just reading the startup script (in my case /etc/init.d/oracle-xe):
less /etc/init.d/oracle-xe
At almost the beginning of the file I found:
ORACLE_HOME=[PATH_TO_INSTALLATION_INCLUDING_VERSION_NUMBER]
This was the quickest solution for me because I knew where the script was located, and that it is used for starting/restarting the server.
Of course, this relies on that the version number actually corresponds to the actual server version, which it should for a correctly installed instance.

- 11,584
- 9
- 62
- 84
A bit manual searching but its an alternative way...
Find the Oracle home or where the installation files for Oracle is installed on your linux server.
cd / <-- Goto root directory
find . -print| grep -i dbm*.sql
Result varies on how you installed Oracle but mine displays this
/db/oracle
Goto the folder
less /db/oracle/db1/sqlplus/doc/README.htm
scroll down and you should see something like this
SQL*Plus Release Notes - Release 11.2.0.2

- 2,487
- 6
- 40
- 66