在学习Administrator's Guide书中的Configuring Automatic Restart of an Oracle Database-Stopping and Restarting Oracle Restart for Maintenance Operations部分时,觉得非常有用的一部分,摘录下来备用:
To stop and start the components in an Oracle home while installing a patch:
1.Prepare to run SRVCTL as described in "Preparing to Run SRVCTL" .
2.Use the SRVCTL utility to stop the components managed by Oracle Restart in an Oracle home:
srvctl stop home -o oracle_home -s state_file [-t stop_options] [-f]
Before stopping the components in an Oracle Grid Infrastructure home, ensure that you first stop the components in a dependent Oracle Database home.
To disable and stop Oracle Restart, use the CRSCTL utility to run the following commands:
crsctl disable has
crsctl stop has
4.Perform the maintenance operation.
crsctl enable has
crsctl start has
srvctl start home -o oracle_home -s state_file
The state file must match the state file specified in Step 2.
srvctl status home -o oracle_home -s state_file
Example1 Stopping Components Managed by Oracle Restart in an Oracle Home:
srvctl stop home -o /u01/app/oracle/product/11.2.0/dbhome_1 -s /usr1/or_state
Example 2 Starting Components Managed by Oracle Restart in an Oracle Home
srvctl start home -o /u01/app/oracle/product/11.2.0/dbhome_1 -s /usr1/or_state
Example3 Displaying the Status of Components Managed by Oracle Restart in an Oracle Home
srvctl status home -o /u01/app/oracle/product/11.2.0/dbhome_1 -s /usr1/or_state