测试11G Oracle Restart能否自动启动被杀掉的组件(一)

2014-11-24 09:48:19 · 作者: · 浏览: 9
测试11G Oracle Restart能否自动启动被杀掉的组件
故事主人公:oralce 11g 之 restart
Oracle 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 OracleRestart 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.
查看环境:
[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  

=从Oracle Restart配置里移除orcl
数据库
实例= [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 could 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 could not be found. PRCR-1001 : Resource ora.orcl.db does not exist

=重启orcl数据库实例=
[html] 
[oracle@oracle11g ~]$ srvctl start database -d orcl  
PRCD-1120 : The resource for database orcl could 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, 2011, 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 fr