Test whether 11G Oracle Restart can automatically start the killed component. The main story is oralce 11g restartOracle Restartis another component of Oracle Grid Infrastructure for a Standalone Server that will be used in this guide. starting with Oracle Database 11g Release 2, thedbstart anddbshut scripts that were used to automate database startup and shutdown in previous Oracle versions are deprecated. oracle now recommends to configure Oracle Database with the specified lerestart feature to automatically restart the database, the listener, Oracle Automatic Storage Management (Oracle ASM ), and other Oracle components after a hardware or software failure or when the database host computer restarts. view environment:
[html] [oracle@oracle11g ~]$ . oraenv ORACLE_SID = [orcl] ? orcl The Oracle base remains unchanged with value /u01/app/oracle [oracle@oracle11g ~]$ srvctl config database -d orcl Database unique name: orcl Database name: orcl Oracle home: /u01/app/oracle/acfsmounts/acfs_db1/dbhome_1 Oracle user: oracle Spfile: +DATA/orcl/spfileorcl.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Database instance: orcl Disk Groups: DATA,FRA Services: [oracle@oracle11g ~]$ ps -ef |grep ora_lgwr_orcl oracle 5836 1 0 10:08 ? 00:00:00 ora_lgwr_orcl oracle 9087 8813 0 10:26 pts/1 00:00:00 grep ora_lgwr_orcl oracle@oracle11g ~]$ kill -9 5836 [oracle@oracle11g ~]$ ps -ef |grep ora_lgwr_orcl oracle 9116 8813 0 10:26 pts/1 00:00:00 grep ora_lgwr_orcl [oracle@oracle11g ~]$ ps -ef |grep ora_lgwr_orcl oracle 9281 1 0 10:27 ? 00:00:00 ora_lgwr_orcl oracle 9337 8813 0 10:27 pts/1 00:00:00 grep ora_lgwr_orcl
= Remove an orcl database instance from the Oracle Restart configuration = [html] [oracle @ oracle11g ~] $ Srvctl status database-d orcl Database is running. [oracle @ oracle11g ~] $ Srvctl config database-d orcl Database unique name: orcl Database name: orcl Oracle home:/u01/app/oracle/acfsmounts/acfs_db1/dbhome_1 Oracle user: oracle Spfile: + DATA/orcl/spfileorcl. ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Database instance: orcl Disk Groups: DATA, FRA Services: [oracle @ oracle11g ~] $ Srvctl remove database-d orcl PRKO-3141: Database orcl cocould not be removed because it was running [oracle @ oracle11g ~] $ Srvctl stop database-d orcl [oracle @ oracle11g ~] $ Srvctl status database-d orcl Database is not running. [oracle @ oracle11g ~] $ Srvctl remove database-d orcl Remove the database orcl? (Y/[n]) y [oracle @ oracle11g ~] $ Srvctl remove database-d orcl PRCD-1120: The resource for database orcl cocould not be found. PRCR-1001: Resource ora. orcl. db does not exist
= Restart an orcl database instance = [html] [oracle @ oracle11g ~] $ Srvctl start database-d orcl PRCD-1120: The resource for database orcl cocould not be found. PRCR-1001: Resource ora. orcl. db does not exist [oracle @ oracle11g ~] $ Sqlplus/as sysdba SQL * Plus: Release 11.2.0.3.0 Production on Thu Apr 19 10:42:00 2012 Copyright (c) 1982,201 1, Oracle. all rights reserved. connected to an idle instance. SQL> startup ORACLE instance started. total System Global Area 521936896 bytes Fixed Size 2229944 bytes Variable Size 352323912 bytes Database Buffers 163577856 bytes Redo Buffers 3805184 bytes Database mounted. database opened. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
= Test whether Oracle Restart can automatically start the killed component again = [html] [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 11287 1 0? 00:00:00 ora_lgwr_orcl oracle 11696 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl [oracle @ oracle11g ~] $ Kill-9 11287 [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 11700 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl
= No restart is found. Restart the database manually = [html] oracle @ oracle11g ~] $ Sqlplus/as sysdba SQL * Plus: Release 11.2.0.3.0 Production on Thu Apr 19 10:46:04 2012 Copyright (c) 1982,201 1, Oracle. all rights reserved. connected to an idle instance. SQL> startup [html] ORACLE instance started. total System Global Area 521936896 bytes Fixed Size 2229944 bytes Variable Size 352323912 bytes Database Buffers 163577856 bytes Redo Buffers 3805184 bytes Database mounted. database opened. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit ProductionWith the Partitioning, Automatic Storage Management, OLAP, Data Miningand Real Application Testing options
= Use EM to add the orcl database instance back to the Oracle Restart configuration. If the page is still Enabled, you can only manually add = [html] [oracle @ oracle11g ~] $ Srvctl add database-d orcl-o/u01/app/oracle/acfsmounts/acfs_db1/dbhome_1 [oracle @ oracle11g ~] $ Srvctl config database-d orcl Database unique name: orcl Database name: Oracle home:/u01/app/oracle/acfsmounts/acfs_db1/dbhome_1 Oracle user: oracle Spfile: Domain: start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Database instance: orcl Disk Groups: Services: [oracle @ oracle11g ~] $ Srvctl status database-d orcl Database is not running. [oracle @ oracle11g ~] $ Srvctl start database-d orcl [oracle @ oracle11g ~] $ Srvctl status database-d orcl Database is running. [oracle @ oracle11g ~] $ Srvctl config database-d orcl Database unique name: orcl Database name: Oracle home:/u01/app/oracle/acfsmounts/acfs_db1/dbhome_1 Oracle user: oracle Spfile: Domain: start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Database instance: orcl Disk Groups: Services: [oracle @ oracle11g ~] $ Srvctl modify database-d orcl-n orcl-p + DATA/orcl/spfileorcl. ora-a DATA, FRA [oracle @ oracle11g ~] $ Srvctl config database-d orcl Database unique name: orcl Database name: orcl Oracle home:/u01/app/oracle/acfsmounts/acfs_db1/dbhome_1 Oracle user: oracle Spfile: + DATA/orcl/spfileorcl. ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Database instance: orcl Disk Groups: DATA, FRA Services:
= Confirm whether the orcl database instance is successfully added to Oracle Restart = [html] [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 17276 1 0? 00:00:00 ora_lgwr_orcl oracle 25574 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl [oracle @ oracle11g ~] $ Kill-9 17276 [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 26107 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 26952 1 0? 00:00:00 ora_lgwr_orcl oracle 27282 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl
= Disable Oracle Restart on an orcl database instance = [html] [oracle @ oracle11g ~] $ Srvctl status database-d orcl-f Database is disabled Database is running.
= Verify whether the killed component is automatically started after Oracle Restart is Disabled = [html] [oracle @ oracle11g ~] $ Kill-9 26952 [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 29080 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl [oracle @ oracle11g ~] $ Ps-ef | grep ora_lgwr_orcl oracle 29461 8813 0 00:00:00 pts/1 grep ora_lgwr_orcl
= Restart Oracle Restart of the orcl database instance = [html] [oracle @ oracle11g ~] $ Srvctl status database-d orcl-f Database is not running. [oracle @ oracle11g ~] $ Srvctl status database-d orcl-f Database is running.
Conclusion: The Restart feature seems to be less powerful than that of Oracle. Of course, ORACLE also shows that (only applicable to 11.2 or later): Oracle Restart can only manage 11.2 resources. oracle Database releases prior to 11.2, however, can coexist on the same server but without being managed by Oracle Restart.