Oracle RAC Documentation

Jephe Wu - http://linuxtechres.blogspot.com

  1. How to check if it's running RAC
BEGIN
  IF dbms_utility.is_cluster_database THEN
      dbms_output.put_line('Running in SHARED/RAC mode.');
  ELSE
      dbms_output.put_line('Running in EXCLUSIVE mode.');
  END IF;
END;
/
 
or
SQL> show parameter CLUSTER_DATABASE
 
 
 2. How to stop/start dbconsole?
Linux: 
$ export ORACLE_HOME=xxx
$ export ORACLE_SID=xxx
$ ORACLE_HOME/bin/emctl stop dbconsole
Windows:
set ORACLE_HOME=xxx
set ORACLE_SID=xxx
ORACLE_HOME\bin\emctl stop dbconsole 
 
Linux:
$ export ORACLE_HOME=xxx
$ export ORACLE_SID=xxx
$ ORACLE_HOME/bin/emctl start dbconsole
Windows:
set ORACLE_HOME=xxx
set ORACLE_SID=xxx
ORACLE_HOME\bin\emctl start dbconsole
Reference: Enterprise Manager Database Console FAQ [ID 863631.1]
 
3.  How to stop/start RAC 
 Bring up the inst1 of database db1 
$ srvctl start instance -d db1 -i inst1

 Stop the db1 database: all its instances and all its services, on all nodes.
$ srvctl stop database -d db1
 
 
4. database uptime
SELECT to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "DB Startup Time" FROM sys.v_$instance;
 
5. alert log location
show parameter BACKGROUND_DUMP_DEST; 
 
6. stop/start RAC
Starting the Oracle 10g RAC Cluster 10g Environment:

- Run as oracle:  su - oracle

$ export ORACLE_SID=orcl1
$ srvctl start nodeapps -n linux1

$ srvctl start asm -n linux1

$ srvctl start instance -d orcl -i orcl1

$ emctl start dbconsole

Start/Stop All Instances with SRVCTL



Stopping the Oracle 10g RAC Cluster 10g Environment: 

- Run as oracle:  su - oracle

$ export ORACLE_SID=orcl1

$ emctl stop dbconsole

$ srvctl stop instance -d orcl -i orcl1
srvctl status instance -d dbname -i instancename

$ srvctl stop asm -n linux1 [-o immediate]

$ srvctl stop nodeapps -n linux1

Starting the Oracle RAC 10g Environment

To stop or start both database instances at once: 

$ srvctl start database -d orcl [-o open | -o mount | -o nomount]

$ srvctl stop database -d orcl [-o normal | -o transactional | -o immediate | -o abort] 
srvctl status database -d dbname

srvctl config database -d dbname (shows instances name, node and oracle home) ==========
 
Services:
srvctl status service -d dbname

 srvctl config service -d dbname

 srvctl start service -d dbname -s servicename

srvctl stop service -d dbname -s servicename 
 
7. lsnrctl PLSExtProc, XDB and XPT
PLSExtProc: This is used to Call OS Commands from PL/SQL using External Procedures. Default in the Listener file. 
the XDB service is used for the XML DB database option 
the XPT service is used for Dataguard. 

All three of these can be disabled if you are not using their associated features.