The following procedure explains the procedure to be followed to check if databases and listeners are up and running. This process is applicable to all Unix Oracle installations, but can easily be modified for other platforms as well.
- Find the databases that are supposed to be up and running from the /etc/oratab or /var/opt/oracle/oratab file. Look for entries that are suffixed by a "Y".
- Check if the database background processes are up and running.
ps -ef | grep smon
- Change the environment and connect to each of these databases to ensure they are opened.
. oraenv; sqlplus username/password
- Find all the listeners in the listener.ora file. This file is located in either the /etc, /var/opt/oracle or $ORACLE_HOME/network/admin directories.
- Make sure each of them is running.
lsnrctl status LISTENER_NAME
- Connect to all databases via their listeners to ensure that the listeners are functioning.
sqlplus username/passwprd@dbdescriptorConnecting to the DB via their listeners should be done from a node different than the one on which the listener is running to make 100% sure that there is remote connectivity.
- Check the database alert log files as sometimes a database might be up and running, but the alert log reports critical errors.
- Chapter 5 of the Oracle8 Concepts guide. See section "Database and Instance Startup and Shutdown".
- Chapter 8 of the Net8 Administrator's Guide. See sections "Starting a Listener" and "Test a Listener".
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free Oracle tips and scripts.
- Tip contest: Have an Oracle tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Ask the Experts: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.
- Forums: Ask your technical Oracle questions--or help out your peers by answering them--in our active forums.
- Best Web Links: Oracle tips, tutorials, and scripts from around the Web.