Managing Oracle Restart
--------------------------
Starting with Oracle Database 11g Release 2 (11.2), the dbstart and dbshut scripts that were used to automate database startup and shutdown, are deprecated.
Configure Oracle Database with the Oracle Restart feature to automatically restart the database, the listener, ASM, and other Oracle components after a hardware or software failure or when the database host computer restarts.
Oracle Restart is used in standalone server (non-clustered) environments only. For Oracle Real Application Clusters (Oracle RAC) environments, the functionality to automatically restart components is provided by Oracle Clusterware.
Oracle Restart automatically restarts various Oracle components when required, and automatically stops Oracle components in an orderly fashion when you manually shut down your system. There may be times, however, when you want to manually start or stop individual Oracle components. Oracle Restart includes the Server Control (SRVCTL) utility that you use to manually start and stop Oracle Restart–managed components. When Oracle Restart is in use, Oracle strongly recommends that you use SRVCTL to manually start and stop components.
Oracle utilities such as SQL*Plus, the Listener Control utility (LSNRCTL), and ASMCMD are integrated with Oracle Restart. If you shut down the database with SQL*Plus, Oracle Restart does not interpret this as a database failure and does not attempt to restart the database. Similarly, if you shut down the Oracle ASM instance with SQL*Plus or ASMCMD, Oracle Restart does not attempt to restart it.
Oracle Restart configuration:
------------------------------
When Oracle Restart starts a component, it starts the component according to the configuration information for that component. For example, the Oracle Restart configuration includes the location of the server parameter file (SPFILE) for databases, and the TCP port to listen on for listeners.
If you install Oracle Restart by installing the Oracle Grid Infrastructure for a standalone server and then create your database, the database is automatically added to the Oracle Restart configuration, and is then automatically restarted when required. However, if you install Oracle Restart on a host computer on which a database already exists, you must manually add the database, the listener, ASM instance, and possibly other components to the Oracle Restart configuration.
Coniguration
----------------
display the current policy:
$> srvctl config database -d orcl [-a]
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/acfsmounts/acfs_db1
Oracle user: oracle
Spfile: /u01/app/oracle/acfsmounts/acfs_db1/dbs/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups:
Services:
$> srvctl modify database -d orcl -a "DATA,FRA"
$> srvctl config database -d orcl
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/acfsmounts/acfs_db1
Oracle user: oracle
Spfile: /u01/app/oracle/acfsmounts/acfs_db1/dbs/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA,FRA
Services:
Starting Up a Database Using SRVCTL
-----------------------------------
When Oracle Restart is installed and configured for your database, Oracle recommends that you use SRVCTL to start the database. This ensures that:
- Any components on which the database depends (such as ASM and the Oracle Net listener) are automatically started first, and in the proper order.
- The database is started according to the settings in its Oracle Restart configuration. An example of such a setting is the server parameter file location.
- Environment variables stored in the Oracle Restart configuration for the database are set before starting the instance.
where db_unique_name matches the DB_UNIQUE_NAME initialization parameter.
STARTUP= srvctl start database -d db_unique_name
STARTUP NOMOUNT=srvctl start database -d db_unique_name -o nomount
STARTUP MOUNT= srvctl start database -d db_unique_name -o mount
STARTUP RESTRICT= srvctl start database -d db_unique_name -o restrict
STARTUP FORCE= srvctl start database -d db_unique_name -o force
STARTUP OPEN RECOVER= srvctl start database -d db_unique_name -o "open,recover"
Shutting Down a Database Using SRVCTL
-------------------------------------
SHUTDOWN [NORMAL]= srvctl stop database -d db_unique_name -o normal
SHUTDOWN IMMEDIATE= srvctl stop database -d db_unique_name -o immediate
SHUTDOWN TRANSACTIONAL= srvctl stop database -d db_unique_name -o transactional
SHUTDOWN ABORT= srvctl stop database -d db_unique_name -o abort
--------------------------
Starting with Oracle Database 11g Release 2 (11.2), the dbstart and dbshut scripts that were used to automate database startup and shutdown, are deprecated.
Configure Oracle Database with the Oracle Restart feature to automatically restart the database, the listener, ASM, and other Oracle components after a hardware or software failure or when the database host computer restarts.
Oracle Restart is used in standalone server (non-clustered) environments only. For Oracle Real Application Clusters (Oracle RAC) environments, the functionality to automatically restart components is provided by Oracle Clusterware.
Oracle Restart automatically restarts various Oracle components when required, and automatically stops Oracle components in an orderly fashion when you manually shut down your system. There may be times, however, when you want to manually start or stop individual Oracle components. Oracle Restart includes the Server Control (SRVCTL) utility that you use to manually start and stop Oracle Restart–managed components. When Oracle Restart is in use, Oracle strongly recommends that you use SRVCTL to manually start and stop components.
Oracle utilities such as SQL*Plus, the Listener Control utility (LSNRCTL), and ASMCMD are integrated with Oracle Restart. If you shut down the database with SQL*Plus, Oracle Restart does not interpret this as a database failure and does not attempt to restart the database. Similarly, if you shut down the Oracle ASM instance with SQL*Plus or ASMCMD, Oracle Restart does not attempt to restart it.
Oracle Restart configuration:
------------------------------
When Oracle Restart starts a component, it starts the component according to the configuration information for that component. For example, the Oracle Restart configuration includes the location of the server parameter file (SPFILE) for databases, and the TCP port to listen on for listeners.
If you install Oracle Restart by installing the Oracle Grid Infrastructure for a standalone server and then create your database, the database is automatically added to the Oracle Restart configuration, and is then automatically restarted when required. However, if you install Oracle Restart on a host computer on which a database already exists, you must manually add the database, the listener, ASM instance, and possibly other components to the Oracle Restart configuration.
Coniguration
----------------
display the current policy:
$> srvctl config database -d orcl [-a]
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/acfsmounts/acfs_db1
Oracle user: oracle
Spfile: /u01/app/oracle/acfsmounts/acfs_db1/dbs/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups:
Services:
$> srvctl modify database -d orcl -a "DATA,FRA"
$> srvctl config database -d orcl
Database unique name: orcl
Database name:
Oracle home: /u01/app/oracle/acfsmounts/acfs_db1
Oracle user: oracle
Spfile: /u01/app/oracle/acfsmounts/acfs_db1/dbs/spfileorcl.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups: DATA,FRA
Services:
Starting Up a Database Using SRVCTL
-----------------------------------
When Oracle Restart is installed and configured for your database, Oracle recommends that you use SRVCTL to start the database. This ensures that:
- Any components on which the database depends (such as ASM and the Oracle Net listener) are automatically started first, and in the proper order.
- The database is started according to the settings in its Oracle Restart configuration. An example of such a setting is the server parameter file location.
- Environment variables stored in the Oracle Restart configuration for the database are set before starting the instance.
where db_unique_name matches the DB_UNIQUE_NAME initialization parameter.
STARTUP= srvctl start database -d db_unique_name
STARTUP NOMOUNT=srvctl start database -d db_unique_name -o nomount
STARTUP MOUNT= srvctl start database -d db_unique_name -o mount
STARTUP RESTRICT= srvctl start database -d db_unique_name -o restrict
STARTUP FORCE= srvctl start database -d db_unique_name -o force
STARTUP OPEN RECOVER= srvctl start database -d db_unique_name -o "open,recover"
Shutting Down a Database Using SRVCTL
-------------------------------------
SHUTDOWN [NORMAL]= srvctl stop database -d db_unique_name -o normal
SHUTDOWN IMMEDIATE= srvctl stop database -d db_unique_name -o immediate
SHUTDOWN TRANSACTIONAL= srvctl stop database -d db_unique_name -o transactional
SHUTDOWN ABORT= srvctl stop database -d db_unique_name -o abort
No comments:
Post a Comment