This section discusses how to change Oracle database settings, apply Oracle database patches, backup and recover Oracle databases. In a cluster system, the shared disk device in which Oracle data is stored is activated and deactivated along with Oracle database startup and stop.
Oracle database is monitored during userApplication operation. If Oracle database is stopped manually, then the cluster system will consider that the Oracle resource fails, so Oracle database will be restarted or Oracle database operation will be switched to the standby node.
While userApplication is not running, the shared disk is deactivated.
If you need to control Oracle database manually for Oracle cold backup or other maintenance tasks, put PRIMECLUSTER in maintenance mode, and stop monitoring the Oracle instances and Listeners temporarily.
General procedure
The general maintenance procedure is as follows:
Start userApplication
Start userApplication that includes the Oracle instance resource if it is stopped.
Put userApplication into maintenance mode and stop monitoring
Put userApplication into maintenance mode.
Next, stop monitoring the Oracle instance and Listener resources by executing the "hvoradisable" command.
Confirmation of maintenance mode and stop of monitoring
Confirm that changing into maintenance mode and stop of monitoring have been successfully done.
(Refer to note of "4.1 hvoradisable - Discontinue Monitoring Resources".)
Enable Oracle Restart settings
Enable Oracle Restart settings when the standby operation that uses ASM and execute the following work.
Select the diskgroups in DBCA
srvctl start asm
srvctl start database
srvctl start listener
Execute the following commands as a Grid user to enable Oracle Restart settings.
srvctl enable asm srvctl enable listener [-l <listener_name>] srvctl enable database -d <db_unique_name>
If the Oracle Restart settings was enabled, disable the Oracle Restart settings in "9. Disable Oracle Restart settings".
When selecting the diskgroups in DBCA, the state of Oracle ASM and diskgroups should be ONLINE on Oracle Restart. Execute the following commands as a Grid user.
To avoid starting Oracle ASM and diskgroups on both nodes, execute the following commands only on the node where userApplication is running.
crsctl status resource -t srvctl start asm (If the Oracle ASM is OFFLINE.) srvctl start diskgroup -g <diskgroup name> (If the diskgroups are OFFLINE.)
When the message that the Oracle ASM and the diskgroups have already been started is output, ignore the message because it is no problem.
Stop Oracle database -dependent resources
If there are Oracle database -dependent resources, stop them manually before stopping Oracle database.
Stop Oracle database
Stop Oracle instance and listener manually.
Do maintenance on Oracle database
Change the Oracle database settings, apply Oracle database patches, backup and recovery Oracle databases.
Start Oracle database
After the maintenance is completed, start Oracle instance to "OPEN" status. Start PDBs for the database using the multitenant architecture. Start Listener if it is also stopped.
Before going on to the next step, be sure to check that Oracle instance and Listener are properly running. The Oracle instance must be OPEN. The OPEN_MODE of PDBs must be "READ WRITE" for the database using the multitenant architecture.
Disable Oracle Restart settings
If "4. Enable Oracle Restart settings" is executed, execute the following commands as a Grid user to disable Oracle Restart settings.
srvctl disable asm srvctl disable listener [-l <listener_name>] srvctl disable database -d <db_unique_name>
Start Oracle database -dependent resources
If Oracle database -dependent resources are stopped, start them manually.
Restart resource monitoring and stop maintenance mode
Restart monitoring the Oracle instance and Listener resources again using "hvoraenable" command.
Next, stop maintenance mode of userApplication.
Confirmation of restart of monitoring and maintenance mode
Confirm that restart of monitoring and changing out of maintenance mode have been successfully done.
(Refer to note of "4.2 hvoraenable - Restart Monitoring Resources".)
Restart userApplication
When the Oracle instance, listener, or ASM is stopped and started manually, restart the userApplication including Oracle resources.
Information
Maintenance mode and resource monitoring
To stop Oracle database with userApplication active, use the "monitoring disruption" function of PRIMECLUSTER Wizard for Oracle.
"Monitoring disruption" - Stop the Oracle resource monitoring only. If non-Oracle resource fails, a failover will be generated.
Maintenance mode of userApplication
If you put userApplication into maintenance mode, resource failure is ignored. It means that userApplication failover and resource autorecovery do not occur even if Oracle database is manually stopped. This enables maintenance work of resources including Oracle resources.
For information on how to put userApplication into maintenance mode, see the "PRIMECLUSTER RMS Configuration and Administration Guide".
Oracle instance and Listener monitoring
hvoradisable and hvoraenable commands enable to discontinue and restart monitoring Oracle instances and Oracle listener resources.
If you put userApplication into maintenance mode only, Oracle session for monitoring remains. If you execute hvoradisable command additionally, the Oracle session is killed. This enables executing SHUTDOWN command with "NORMAL" option in Oracle database manual stop.
For information on how to cancel or restart monitoring the Oracle instance and Listener resource, refer to "4.1 hvoradisable - Discontinue Monitoring Resources" and "4.2 hvoraenable - Restart Monitoring Resources".
Note
Monitoring restart
If Oracle instances and Oracle listeners are stopped manually after resource monitoring disruption, start them manually before starting resource monitoring again. Start PDBs manually for the database using the multitenant architecture. If you restart resource monitoring with the Oracle resources inactive, the Oracle resources will fail.
Resource state during monitoring
If the "hvoradisable" command properly stops monitoring the resources, they will enter Warning.
Plan the maintenance procedure according to the operation environment and the maintenance requirement. Refer to the procedures described in this section and the Oracle Database documents.
Be sure to stop monitoring the Oracle instance and listener resources by executing the "hvoradisable" command in "2. Put userApplication into maintenance mode and stop monitoring".
If the hvoradisable command is not executed, the following problems might be caused.
The monitoring modules of PRIMECLUSTER Wizard for Oracle are using the library of Oracle Database. If the patch of the Oracle database is applied while the monitoring modules has executed, the library files of Oracle database may not be updated. Therefore, it is necessary to stop the monitoring modules by stop monitoring.
When it was executed only to put userApplication into maintenance mode, the failover etc. are not executed. However, the monitoring modules monitor the Oracle instance resource and the listener resource. Under such a condition, because failure is internally detected when the Oracle instance and the listener stops, unexpected resource failure or userApplication failover might be caused.