How to know if oracle is installed on Unix/Windows

How to know if oracle is installed in Unix -

Combination of checks below:

1. ps -ef grep pmon (or) ps -ef grep smon

This should give you at least one line of data....which will be the indication that there is an instance of Oracle running.

2. Look for a file /etc/oratab.
Its content should reveal all ORACLE_HOMEs present at your box.
When configuring a database is modify the oratab file for instance startup and shutdown at reboot.If the instance is in the oratab file, it is configured.

3. find / -name oracle -ls

4. Check if any Oracle processes are running by using "ps -ef grep ora" command

5. find / -name sqlplus

A database instance is the shell or the process that you would see in a Unix's PS and grep PMON.The database inself is instantiated with the CREATE DATABASE command, that is done within the instance.Thus you could have multiple databases in an instance. It is generally recommended to have one database per instance.The ORATAB would be used to check the database.The Oratab can be used to auto start databases as well as cycling through to backup each database on a given server. If you only have one database and one instance, then the PS command should suffice.

How to know if oracle is installed in Windows -

Combination of checks below:


If the Windows service is set to automatically start when the server boots but the database does not start, you may have a improper registry setting or you may have a bad service.

1. Check Task Manager for the ORACLE.EXE process. If it is present, then the service started.

2. Check the Alert Log for the database. If the problem is not with the database, there will be no indication in the log that the database even tried to start.

3. Check the oradim.log in the $ORACLE_HOME/database directory for errors. Check the date on the log file as versions before 9i did not date/time stamp the entries.

If there are no errors in the logs then try and start the database.
C:> sqlplus "/ as sysdba"
connected to an idle instance
SQL> starup

References:

Migrating from Oracle to SQL Server -
http://www.sql-server-performance.com/articles/dba/migrating_from_oracle_to_sql_server_p1.aspx

Oracle Basics: Querying an Oracle Database - http://www.devx.com/dbzone/article/16393

Oracle Concepts: The Instance and the Database - http://www.devx.com/dbzone/Article/20713

White Paper: SQL Server 2008 Compared to Oracle Database 11g - http://www.microsoft.com/sqlserver/2008/en/us/sql2008-oracle11g.aspx

Oracle vs SQL Server -
http://weblog.infoworld.com/dbunderground/archives/2008/03/oracle_vs_sql_s.html