Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find which version of Oracle is installed on a Linux server (In terminal) [closed]

Tags:

linux

oracle

rhel

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.

like image 852
PolarisUser Avatar asked Jun 04 '12 14:06

PolarisUser


People also ask

How do I check if oracle is installed on Linux?

Go to $ORACLE_HOME/oui/bin . Start Oracle Universal Installer. Click Installed Products to display the Inventory dialog box on the Welcome screen. Select an Oracle Database product from the list to check the installed contents.

How do I determine oracle version?

Description. You can check the Oracle version by running a query from the command prompt. The version information is stored in a table called v$version. In this table you can find the version information for Oracle, PL/SQL, etc.

How do I tell what Oracle Database is installed?

From the Start menu, select All apps, then Oracle - HOMENAME, then Oracle Installation Products, then Universal Installer. In the Welcome window, click Installed Products to display the Inventory dialog box. To check the installed contents, find the Oracle Database product in the list.


2 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%';
like image 87
Rahul Avatar answered Sep 21 '22 18:09

Rahul


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}'
like image 27
mleu Avatar answered Sep 25 '22 18:09

mleu