This section describes startup, shutdown and monitoring of Oracle resources in standby operation using Oracle Data Guard/Oracle Active Data Guard.
Oracle instance startup
Startup procedure of an Oracle instance is as follows:
su - <Oracle user>
sqlplus /nolog
connect / as sysdba
startup nomount or startup mount
alter database mount; (if "startup nomount" was executed at step "4")
The procedure according to the database role is executed.
If UsePDB of Oracle instance resource is set to yes, start the PDBs.
Primary Database
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
Physical Standby Database
The procedure according to the REDOApply of the Oracle instance resource is executed.
ReceiveOnly
No procedure.
NormalApply
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING ARCHIVED LOGFILE DISCONNECT;
RealTimeApply
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
ReadOnlyOPEN
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
RealTimeQueryN
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING ARCHIVED LOGFILE DISCONNECT;
RealTimeQueryR
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Logical Standby Database
The procedure according to the REDOApply of the Oracle instance resource is executed.
ReceiveOnly, ReadOnlyOPEN, RealTimeQueryN, RealTimeQueryR
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
NormalApply
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
ALTER DATABASE START LOGICAL STANDBY APPLY;
RealTimeApply
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
Snapshot Standby Database
ALTER DATABASE OPEN;
alter pluggable database all open; (if UsePDB of Oracle instance resource is set to yes.)
Oracle instance shutdown
Shutdown procedure of an Oracle instance is as follows:
Shutdown procedure of an Oracle instance by user operation is as follows:
su - <Oracle user>
sqlplus /nolog
connect / as sysdba
When the roll is PHYSICAL STANDBY or LOGICAL STANDBY, stop REDO apply.
Physical Standby Database
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Logical Standby Database
ALTER DATABASE ABORT LOGICAL STANDBY APPLY;
shutdown <immediate / abort / transactional> (Setup with StopModeStop)
Default : immediate
If Oracle instance is not stopped at step "5" (except for abort), use shutdown abort.
If Oracle instance is not stopped at step "5" or "6", shut it down forcibly by sending SIGKILL to the background process.
Shutdown procedure of an Oracle instance by resource failure or failover is as follows:
su - <Oracle user>
sqlplus /nolog
connect / as sysdba
shutdown <immediate / abort> (Setup with StopModeFail)
Default : abort
If Oracle instance is not stopped at step "4" (except for abort), use shutdown abort.
If Oracle instance is not stopped at step "4" or "5", shut it down forcibly by sending SIGKILL to the background process.
Monitoring Oracle instances
Monitoring procedure of an Oracle instance is as follows:
Check the Oracle background processes (PMON, SMON) every 30 seconds (static).
If the processes status can be confirmed after Oracle instance gets activated, go to the step "2".
su - <Oracle user>
Local connection to the Oracle instance as the SYSTEM user or SYSDBA privilege.
When the roll is PRIMARY, LOGICAL STANDBY or SNAPSHOT STANDBY, check the status of the Oracle instance is “OPEN".
When the roll is PHYSICAL STANDBY, check the status of the Oracle instance is "MOUNTED" or “OPEN".
Check if the Oracle background processes (PMON, SMON, DBWn, LGWR, CKPT) are alive.
The monitoring interval can be changed at the setting of "Interval" and its default value is 30 seconds.
When the roll is PRIMARY, check if SQL (INSERT, UPDATE, DELETE and COMMIT) can be properly executed using the monitoring table on the SYSTEM user's default table space.
The monitoring with SQL is executed in accordance with the setting of "Interval". The elapsed time from the last monitoring is checked. Only when 60 seconds or more pass, the monitoring with SQL is executed.
Monitoring PDB
When UsePDB of Oracle instance resource is set to yes and the CDB is started to the OPEN state, the monitoring of PDB is executed in accordance with the setting of "Interval".
OPEN_MODE of each PDBs is checked by the V$PDBS table.
Oracle instance is reconnected once every 24 hours.
In the standby node, step 1 is executed to confirm that the Oracle background processes (PMON, SMON) do not exist
Monitoring PDB
OPEN_MODE of each PDBs is checked by the V$PDBS table.
Primary Database, Logical Standby Database and Snapshot Standby Database
If OPEN_MODE is "READ WRITE", it is judged that the PDB is normal.
If OPEN_MODE is not "READ WRITE", It is judged that the PDB is abnormal.
Physical Standby Database
The procedure according to the REDOApply of the Oracle instance resource is executed.
ReceiveOnly, NormalApply and RealTimeApply
The PDBs are not monitored.
ReadOnlyOPEN, RealTimeQueryN, RealTimeQueryR
If OPEN_MODE is "READ WRITE", it is judged that the PDB is normal.
If OPEN_MODE is not "READ WRITE", It is judged that the PDB is abnormal.
The monitoring of the PDB is executed in accordance with the setting of "Interval". When the state changes when monitoring it last time, the message is output to syslog. The restart and the failover due to fault of PDBs is not executed.
When the state of PDB becomes normal, the following messages are output.
FSP_PCLW-ORACLE_FJSVclora: INFO: 9142: OPEN_MODE of PDB <PDB name> was OPEN. (CDB=<ORACLE_SID of CDB> PDB=<PDB name> OPEN_MODE=<state of PDB>)
When the state of PDB becomes abnormal, the following messages are output.
FSP_PCLW-ORACLE_FJSVclora: ERROR: 9242: clorapdbmon detected OPEN_MODE of PDB <PDB name> is invalid. (CDB=<ORACLE_SID of CDB> PDB=<PDB name> OPEN_MODE=<state of PDB>)
Listener startup, shutdown and monitoring
Startup, shutdown and monitoring of listeners are same as does not use Oracle Data Guard. For details, see "3.1.1 Standby Operation".
Oracle ASM instance startup, shutdown and monitoring
Startup, shutdown and monitoring of Oracle ASM instance are same as does not use Oracle Data Guard. For details, see "3.1.1 Standby Operation".