Database health check (RAC)


bash-3.2$ ps -ef|grep pmon
 oracle 17971 1 0 Jun 20 ? 46:31 asm_pmon_+ASM1
 oracle 13012 21935 0 13:54:47 pts/1 0:00 grep pmon
 oracle 15501 1 0 Sep 15 ? 36:03 ora_pmon_AZKKDB1

bash-3.2$ ps -ef|grep tns
 oracle 7406 1 0 Apr 04 ? 118:31 /u02/app/oracle/product/grid/db_1/bin/tnslsnr LISTENER -inherit
 oracle 23098 21935 0 13:55:03 pts/1 0:00 grep tns
ORACLE_SID=`ps -ef | grep asm_smon | grep -v 'grep' | grep -v 'sed' | awk '{printf $8}' | awk 'BEGIN{FS="_"} {printf $3}'`
export ORACLE_SID
sqlplus "/as sysdba"
set pages 9999 lines 300
col OPEN_MODE for a10
col HOST_NAME for a10

select name,INSTANCE_NAME,HOST_NAME,OPEN_MODE,DATABASE_STATUS,DATABASE_ROLE, PROTECTION_LEVEL,CONTROLFILE_TYPE,LOGINS,to_char(STARTUP_TIME,'DD-MON-YYYY HH24:MI:SS') "UP TIME"from v$database,Gv$instance;

alter system checkpoint;

alter system switch logfile;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: