Oracle 12.1 RAC安裝新主機,識別老儲存和恢復資料庫例子

warehouse發表於2016-11-26
一篇非常有參考意義的文章複製過來準備借鑑一下,客戶的主機目前32g記憶體,加了32g之後os識別不了,查了一堆資料說是可能需要重新編譯核心,折騰的時候我擔心os啟動不了需要重灌。由於db比較大,所以儲存我不想動,也就是我不想恢復db,萬一重灌os之後,如何識別老儲存而把db掛載起來一直是我思考的問題,搜了一下發現網上這批文章,借鑑一下,原文連結在最下面。
 
又找到一篇和本文類似的文章,貌似也是同一個作者的作品:

http://blog.csdn.net/u011478909/article/details/51960261


具體步驟如下(因為先在12.1中測試,然後才在112.測試,
因此這裡的測試記錄了發現的一些問題和處理方法,而11.2中模擬主機損壞,直接使用了這裡的經驗,因此沒有任何報錯資訊):
1,安裝12.1.0.2的GI軟體,如果需要也apply最新的PSU,然後檢視磁碟和磁碟組:
[grid@lunarrac ~]$ kfod disks=all ds=true cluster=true status=true
 --------------------------------------------------------------------------------
  Disk          Size Header    Path                                     Disk Group   User     Group  
 ================================================================================
    1:       2047 Mb MEMBER    /dev/asm-diskb                           CRSDG        grid     asmadmin
    2:       2047 Mb MEMBER    /dev/asm-diskc                           CRSDG        grid     asmadmin
    3:       2047 Mb MEMBER    /dev/asm-diskd                           CRSDG        grid     asmadmin
    4:       2048 Mb MEMBER    /dev/asm-diske                           DATADG       grid     asmadmin
    5:       2048 Mb MEMBER    /dev/asm-diskf                           DATADG       grid     asmadmin
    6:       2048 Mb MEMBER    /dev/asm-diskg                           DATADG       grid     asmadmin
    7:       3072 Mb MEMBER    /dev/asm-diskh                           DATADG2      grid     asmadmin
    8:      10240 Mb MEMBER    /dev/asm-diski                           DATADG2      grid     asmadmin
 --------------------------------------------------------------------------------
 ORACLE_SID ORACLE_HOME                                      HOST_NAME          
 ================================================================================
      +ASM1 /u01/app/12.1.0.2/grid                           lunarrac                      
 [grid@lunarrac ~]$
建立ASM的spfile
 [grid@lunarrac ~]$ ss
 SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 14 19:08:33 2016
 
 Copyright (c) 1982, 2014, Oracle.  All rights reserved.
 
 
 Connected to:
 Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
 With the Real Application Clusters and Automatic Storage Management options
 
 SQL> create pfile='/tmp/asm.pfile' from spfile;
 
 File created.
 
 SQL>
新增磁碟組'CRSDG', 'DATADG', 'DATADG2'
 1
 SQL> alter system set asm_diskgroups='CRSDG', 'DATADG', 'DATADG2' scope=both;
 
 System altered.
 
 SQL>
查詢spfile:
f.group_number, f.file_number, a.name name, f.type type
   2  FROM v$asm_file f, v$asm_alias a
   3  WHERE f.group_number=a.group_number and f.file_number=a.file_number
   4   and f.type='PARAMETERFILE'
   5  ORDER BY 1, 2;
 
     GROUP_NUMBER      FILE_NUMBER NAME                                                    TYPE
 ---------------- ---------------- ------------------------------------------------------- -------------------------
                1              268 spfile.268.903782013                                    PARAMETERFILE
                2              273 spfile.273.892298577                                    PARAMETERFILE
 
 Elapsed: 00:00:00.16
 >
這裡看到有兩個spfile,哪一個是我們需要的呢?
 或者如果這個儲存上有多個資料庫時,怎麼確定哪個資料庫使用哪個spfle?
 我們知道ASM內部是使用OMF管理資料檔案的,因此,它的命名規則是:
 因此,根據dbuniquename我們就可以確定哪個資料庫使用哪個spfile。
+group/DB_UNIQUE_NAME/file_type/file_type_tag.file#.incarnation#
檔案型別是datafile, controlfile, onlinelog等等
ASMCMD> ls -l
 Type           Redund  Striped  Time             Sys  Name
 PARAMETERFILE  UNPROT  COARSE   DEC 25 10:00:00  Y    spfile.273.892298577
 ASMCMD> pwd
 +datadg2/lunar/PARAMETERFILE
 ASMCMD>
我們將spifle從ASM中複製到檔案系統,然後檢視其中資訊是否正確:
ASMCMD> cp spfile.273.892298577 /tmp/spfile.273.892298577
 copying +datadg2/lunar/PARAMETERFILE/spfile.273.892298577 -> /tmp/spfile.273.892298577
 ASMCMD> ls -l
 Type           Redund  Striped  Time             Sys  Name
 PARAMETERFILE  UNPROT  COARSE   FEB 14 20:00:00  Y    spfile.273.892298577
 ASMCMD>
檢視spfile
 [grid@lunarrac ~]$ strings /tmp/spfile.273.892298577
 lunar1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
 lunar2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
 *._gc_policy_time=0
 *._gc_undo_affinity=FALSE
 *._index_partition_large_extents='FALSE'
 *._optimizer_adaptive_cursor_sharing=FALSE
 *._optimizer_extended_cursor_sharing='NONE'
 *._optimizer_extended_cursor_sharing_rel='NONE'
 *._optimizer_null_aware_antijoin=FALSE
 *._optimizer_use_feedback=FALSE
 *._partition_large_extents='FALSE'
 *._PX_use_large_
 pool=TRUE
 *._undo_autotune=FALSE
 *.audit_file_dest='/u01/app/oracle/admin/lunar/adump'
 *.audit_trail='NONE'
 *.cluster_database=true
 *.compatible='12.1.0.2.0'
 *.control_files='+DATADG2/LUNAR/CONTROLFILE/current.257.892295167','+DATADG2/LUNAR/CONTROLFILE/current.258.892295171'
 *.db_block_size=8192
 *.db_cache_size=52428800
 *.db_create_file_dest='+DATADG2'
 *.db_domain=''
 *.db_name='lunar'
 *.db_recovery_file_dest='+DATADG2'
 *.db_recovery_file_dest_size=5565m
 *.db_writer_processes=2
 *.defe
 rred_segment_creation=FALSE
 *.diagnostic_dest='/u01/app/oracle'
 *.dispatchers='(PROTOCOL=TCP) (SERVICE=lunarXDB)'
 *.event='28401 trace name context forever,level 1','10949 trace name context forever,level 1'
 lunar2.instance_number=2
 lunar1.instance_number=1
 *.java_pool_size=52428800
 *.job_queue_processes=5
 *.large_pool_size=10485760
 *.log_archive_format='%t_%s_%r.dbf'
 *.log_buffer=10305536
 *.memory_target=0
 *.open_cursors=300
 *.parallel_force_local=TRUE
 *.parallel_max_servers=30
 *.pa
 rallel_min_servers=30
 *.parallel_servers_target=30
 *.pga_aggregate_limit=629145600
 *.pga_aggregate_target=360m
 *.processes=150
 *.remote_login_passwordfile='exclusive'
 *.resource_limit=TRUE
 *.resource_manager_plan=''
 *.session_cached_cursors=30
 *.sga_target=0
 *.shared_pool_size=419430400
 lunar2.thread=2
 lunar1.thread=1
 lunar2.undo_tablespace='UNDOTBS2'
 lunar1.undo_tablespace='UNDOTBS1'
 [grid@lunarrac ~]$
這時,啟動是資料庫會報錯:
[oracle@lunarrac ~]$ ss
 
 SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 14 21:05:13 2016
 
 Copyright (c) 1982, 2014, Oracle.  All rights reserved.
 
 Connected to an idle instance.
 
 
 ORACLE instance started.
 
 Total System Global Area        557842432 bytes
 Fixed Size                        2926520 bytes
 Variable Size                   486541384 bytes
 Database Buffers                 54525952 bytes
 Redo Buffers                     13848576 bytes
 ORA-00205: error in identifying control file, check alert log for more info
 >
 alert中報錯如下:
ORACLE_BASE from environment = /u01/app/oracle
 Sun Feb 14 21:11:42 2016
 ALTER DATABASE   MOUNT
 Sun Feb 14 21:11:42 2016
 This instance was first to mount
 Sun Feb 14 21:11:42 2016
 NOTE: ASMB mounting group 2 (DATADG2)
 Sun Feb 14 21:11:42 2016
 ORA-15025: could not open disk "/dev/asm-diskh"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 Sun Feb 14 21:11:42 2016
 ORA-15025: could not open disk "/dev/asm-diski"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 NOTE: Disk 0 in group 2 could not be opened.
 WARNING: Failed to complete group 2
 WARNING: group 2 is being dismounted.
 WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
 SUCCESS: diskgroup DATADG2 was dismounted
 NOTE: ASMB mounting group 2 (DATADG2)
 Sun Feb 14 21:11:43 2016
 ORA-15025: could not open disk "/dev/asm-diskh"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 ORA-15040: diskgroup is incomplete
 ORA-15040: diskgroup is incomplete
 Sun Feb 14 21:11:43 2016
 ORA-15025: could not open disk "/dev/asm-diski"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 NOTE: Disk 0 in group 2 could not be opened.
 WARNING: Failed to complete group 2
 WARNING: group 2 is being dismounted.
 WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
 SUCCESS: diskgroup DATADG2 was dismounted
 Sun Feb 14 21:11:43 2016
 ORA-00210: cannot open the specified control file
 ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.258.892295171'
 ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.258.892295171
 ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
 ORA-15040: diskgroup is incomplete
 ORA-00210: cannot open the specified control file
 ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.257.892295167'
 ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.257.892295167
 ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
 ORA-15040: diskgroup is incomplete
 ORA-205 signalled during: ALTER DATABASE   MOUNT...
 Sun Feb 14 21:12:07 2016
 Decreasing number of real time LMS from 1 to 0
根據報錯資訊,我們知道,是因為oracle沒有訪問asm磁碟組的許可權造成的,因此需要修改oracle許可權:
[grid@lunarrac ~]$ $ORACLE_HOME/bin/setasmgidwrap o=/u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
 [grid@lunarrac ~]$ ls -lrt /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
 -rwsr-s--x 1 oracle asmadmin 323762276 Feb 14 18:15 /u01/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
 [grid@lunarrac ~]$
再次mount資料庫,依然報錯:
database mount;
 alter database mount
 *
 ERROR at line 1:
 ORA-00205: error in identifying control file, check alert log for more info
 Elapsed: 00:00:17.22
 >
報錯資訊如下:
alter database mount
 Sun Feb 14 21:18:10 2016
 This instance was first to mount
 Process O000 died, see its trace file
 Sun Feb 14 21:18:12 2016
 NOTE: ASMB mounting group 2 (DATADG2)
 Process O000 died, see its trace file
 Sun Feb 14 21:18:16 2016
 ORA-15025: could not open disk "/dev/asm-diskh"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 ORA-15040: diskgroup is incomplete
 ORA-15040: diskgroup is incomplete
 Sun Feb 14 21:18:19 2016
 ORA-15025: could not open disk "/dev/asm-diski"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 NOTE: Disk 0 in group 2 could not be opened.
 WARNING: Failed to complete group 2
 Sun Feb 14 21:18:24 2016
 WARNING: group 2 is being dismounted.
 WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
 SUCCESS: diskgroup DATADG2 was dismounted
 NOTE: ASMB mounting group 2 (DATADG2)
 Sun Feb 14 21:18:26 2016
 ORA-15025: could not open disk "/dev/asm-diskh"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 ORA-15040: diskgroup is incomplete
 ORA-15040: diskgroup is incomplete
 Sun Feb 14 21:18:26 2016
 ORA-15025: could not open disk "/dev/asm-diski"
 ORA-27041: unable to open file
 Linux-x86_64 Error: 13: Permission denied
 Additional information: 9
 NOTE: Disk 0 in group 2 could not be opened.
 WARNING: Failed to complete group 2
 WARNING: group 2 is being dismounted.
 WARNING: ASMB force dismounting group 2 (DATADG2) due to failed mount
 SUCCESS: diskgroup DATADG2 was dismounted
 Sun Feb 14 21:18:26 2016
 ORA-00210: cannot open the specified control file
 ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.258.892295171'
 ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.258.892295171
 ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
 ORA-15040: diskgroup is incomplete
 ORA-00210: cannot open the specified contro( file
 ORA-00202: control file: '+DATADG2/LUNAR/CONTROLFILE/current.257.892295167'
 ORA-17503: ksfdopn:2 Failed to open file +DATADG2/LUNAR/CONTROLFILE/current.257.892295167
 ORA-15001: diskgroup "DATADG2" does not exist or is not mounted
 ORA-15040: diskgroup is incomplete
 ORA-205 signalled during: alter database mount
 ...
 Process m000 died, see its trace file
 Process m001 died, see its trace file
 Process m000 died, see its trace file
 Process m000 died, see its trace file
 Process m001 died, see its trace file
 Process m000 died, see its trace file
具體的trace檔案如下:
Trace file /u01/app/oracle/diag/rdbms/lunar/lunar1/trace/lunar1_m000_14358.trc
 Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
 With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
 Advanced Analytics and Real Application Testing options
 ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/dbhome_1
 System name:    Linux
 Node name:      lunarrac
 Release:        3.8.13-44.1.1.el6uek.x86_64
 Version:        #2 SMP Wed Sep 10 06:10:25 PDT 2014
 Machine:        x86_64
 Instance name: lunar1
 Redo thread mounted by this instance: 0
 Oracle process number: 0
 Unix process pid: 14358, image:
 *** 2016-02-14 21:20:01.641
 Died during process startup with error 27140 (seq=94)
 OPIRIP: Uncaught error 27140. Error stack:
 ORA-27140: attach to post/wait facility failed
 ORA-27300: OS system dependent operation:invalid_egid failed with status: 1
 ORA-27301: OS failure message: Operation not permitted
 ORA-27302: failure occurred at: skgpwinit6
 ORA-27303: additional information: startup egid = 6000 (oinstall), current egid = 5000 (asmadmin)
 ~
這裡看到,應該是資料庫還是不能訪問磁碟組,將磁碟組註冊到ocr中的過程如下:
SQL> alter diskgroup datadg mount
 Sun Feb 14 21:42:56 2016
 NOTE: cache registered group DATADG 2/0x4BA26F20
 NOTE: cache began mount (first) of group DATADG 2/0x4BA26F20
 NOTE: Assigning number (2,1) to disk (/dev/asm-diskf)
 NOTE: Assigning number (2,2) to disk (/dev/asm-diskg)
 NOTE: Assigning number (2,0) to disk (/dev/asm-diske)
 Sun Feb 14 21:43:02 2016
 NOTE: GMON heartbeating for grp 2 (DATADG)
 GMON querying group 2 at 17 for pid 30, osid 19564
 Sun Feb 14 21:43:02 2016
 NOTE: cache is mounting group DATADG created on 2015/10/05 07:49:39
 NOTE: cache opening disk 0 of grp 2: DATADG_0000 path:/dev/asm-diske
 NOTE: 02/14/16 21:43:02 DATADG.F1X0 found on disk 0 au 10 fcn 0.0 datfmt 1
 NOTE: cache opening disk 1 of grp 2: DATADG_0001 path:/dev/asm-diskf
 NOTE: 02/14/16 21:43:02 DATADG.F1X0 found on disk 1 au 10 fcn 0.0 datfmt 1
 NOTE: cache opening disk 2 of grp 2: DATADG_0002 path:/dev/asm-diskg
 NOTE: 02/14/16 21:43:02 DATADG.F1X0 found on disk 2 au 10 fcn 0.0 datfmt 1
 Sun Feb 14 21:43:02 2016
 NOTE: cache mounting (first) normal redundancy group 2/0x4BA26F20 (DATADG)
 Sun Feb 14 21:43:02 2016
 * allocate domain 2, invalid = TRUE
 Sun Feb 14 21:43:03 2016
 NOTE: attached to recovery domain 2
 Sun Feb 14 21:43:03 2016
 * validated domain 2, flags = 0x0
 NOTE: cache recovered group 2 to fcn 0.73
 NOTE: redo buffer size is 256 blocks (1056768 bytes)
 Sun Feb 14 21:43:03 2016
 NOTE: LGWR attempting to mount thread 1 for diskgroup 2 (DATADG)
 NOTE: LGWR found thread 1 closed at ABA 11.22 lock domain=0 inc#=0 instnum=1
 NOTE: LGWR mounted thread 1 for diskgroup 2 (DATADG)
 Sun Feb 14 21:43:03 2016
 NOTE: LGWR opened thread 1 (DATADG) at fcn 0.73 ABA 12.23 lock domain=2 inc#=2 instnum=1 gx.incarn=1268936480 mntstmp=2016/02/14 21:43:03.557000
 Sun Feb 14 21:43:03 2016
 NOTE: cache mounting group 2/0x4BA26F20 (DATADG) succeeded
 NOTE: cache ending mount (success) of group DATADG number=2 incarn=0x4ba26f20
 Sun Feb 14 21:43:03 2016
 NOTE: Instance updated compatible.asm to 12.1.0.0.0 for grp 2
 Sun Feb 14 21:43:03 2016
 SUCCESS: diskgroup DATADG was mounted
 Sun Feb 14 21:43:03 2016
 SUCCESS: alter diskgroup datadg mount
 Sun Feb 14 21:43:04 2016
 NOTE: diskgroup resource ora.DATADG.dg is online
 WARNING: unknown state for diskgroup resource ora.DATADG.dg, Return Value: 3
再次檢視,ocr中已經包含了這些磁碟組
[root@lunarrac ~]# crsctl status res -t
 --------------------------------------------------------------------------------
 Name           Target  State        Server                   State details      
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.CRSDG.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.DATADG.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.DATADG2.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.LISTENER.lsnr
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.asm
                ONLINE  ONLINE       lunarrac                 Started,STABLE
 ora.net1.network
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.ons
                ONLINE  ONLINE       lunarrac                 STABLE
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.MGMTLSNR
       1        ONLINE  ONLINE       lunarrac                 169.254.52.98 192.16
                                                              8.60.56,STABLE
 ora.cvu
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.lunarrac.vip
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.mgmtdb
       1        OFFLINE OFFLINE                               STABLE
 ora.oc4j
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.scan1.vip
       1        ONLINE  ONLINE       lunarrac                 STABLE
 --------------------------------------------------------------------------------
 [root@lunarrac ~]#
將資料庫註冊到ocr中:
 在12.1中如果沿用11.2的配置資料庫命令,那麼資料庫可以啟動,但是可以發現配置資訊是有問題的:
例如,“Database name: lunarrac”這裡顯示lunarrac是我的主機名,而資料庫名是lunar,因此使用112.的命令註冊資料庫到ocr會有其他未知問題
 建議,在不同版本,根據不同版本的命令進行註冊。
[oracle@lunarrac ~]$ srvctl add database -d lunar -n lunarrac -o $ORACLE_HOME -p +datadg2/lunar/PARAMETERFILE/spfile.273.892298577 -s OPEN -y AUTOMATIC -a "CRSDG,DATADG,DATADG2" -t IMMEDIATE
 [oracle@lunarrac ~]$ srvctl config database -d lunar
 Database unique name: lunar
 Database name: lunarrac
 Oracle home: /u01/app/oracle/product/12.1.0.2/dbhome_1
 Oracle user: oracle
 Spfile: +datadg2/lunar/PARAMETERFILE/spfile.273.892298577
 Password file:
 Domain:
 Start options: open
 Stop options: immediate
 Database role: PRIMARY
 Management policy: AUTOMATIC
 Server pools:
 Disk Groups: CRSDG,DATADG,DATADG2
 Mount point paths:
 Services:
 Type: RAC
 Start concurrency:
 Stop concurrency:
 OSDBA group: dba
 OSOPER group: oinstall
 Database instances:
 Configured nodes:
 Database is administrator managed
 [oracle@lunarrac ~]$
檢查crs狀態,資料庫已經註冊進去了:
[root@lunarrac ~]# crsctl status res -t
 --------------------------------------------------------------------------------
 Name           Target  State        Server                   State details      
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.CRSDG.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.DATADG.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.DATADG2.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.LISTENER.lsnr
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.asm
                ONLINE  ONLINE       lunarrac                 Started,STABLE
 ora.net1.network
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.ons
                ONLINE  ONLINE       lunarrac                 STABLE
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.MGMTLSNR
       1        ONLINE  ONLINE       lunarrac                 169.254.52.98 192.16
                                                              8.60.56,STABLE
 ora.cvu
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.lunar.db
       1        OFFLINE OFFLINE                               STABLE
 ora.lunarrac.vip
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.mgmtdb
       1        OFFLINE OFFLINE                               STABLE
 ora.oc4j
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.scan1.vip
       1        ONLINE  ONLINE       lunarrac                 STABLE
 --------------------------------------------------------------------------------
 [root@lunarrac ~]#
啟動資料庫:
[oracle@lunarrac ~]$ srvctl start database -d lunar
 [oracle@lunarrac ~]$
 .
 [root@lunarrac ~]# crsctl status res -t
 --------------------------------------------------------------------------------
 Name           Target  State        Server                   State details      
 --------------------------------------------------------------------------------
 Local Resources
 --------------------------------------------------------------------------------
 ora.CRSDG.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.DATADG.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.DATADG2.dg
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.LISTENER.lsnr
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.asm
                ONLINE  ONLINE       lunarrac                 Started,STABLE
 ora.net1.network
                ONLINE  ONLINE       lunarrac                 STABLE
 ora.ons
                ONLINE  ONLINE       lunarrac                 STABLE
 --------------------------------------------------------------------------------
 Cluster Resources
 --------------------------------------------------------------------------------
 ora.LISTENER_SCAN1.lsnr
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.MGMTLSNR
       1        ONLINE  ONLINE       lunarrac                 169.254.52.98 192.16
                                                              8.60.56,STABLE
 ora.cvu
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.lunar.db
       1        ONLINE  ONLINE       lunarrac                 Open,STABLE
 ora.lunarrac.vip
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.mgmtdb
       1        OFFLINE OFFLINE                               STABLE
 ora.oc4j
       1        ONLINE  ONLINE       lunarrac                 STABLE
 ora.scan1.vip
       1        ONLINE  ONLINE       lunarrac                 STABLE
 --------------------------------------------------------------------------------
 [root@lunarrac ~]#
在掛完老儲存後,還需要檢查口令檔案,如果有必要,需要重新給sys和system授予sysdba,sysoper許可權,以便使用作業系統認證方式登入資料庫。
from:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-2129148/,如需轉載,請註明出處,否則將追究法律責任。

相關文章