oracle 11.2 RAC 系列安裝新主機,識別老儲存-2-準備識別資料庫

來源:互聯網
上載者:User

假設原來的主機已經完全不能啟動了(比如硬體故障等),只能在儲存上的ASM中尋找資料庫使用的參數檔案:
[grid@lunar5 ~]$ ss
 
SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 21:48:15 2016
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
 
SYS@+ASM1>col name for a55
SYS@+ASM1>col type for a25
SYS@+ASM1>SELECT 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
---------------- ---------------- ------------------------------------------------------- -------------------------
               2              272 spfile.272.892409049                                    PARAMETERFILE
               2              272 spfilelunar.ora                                         PARAMETERFILE
 
Elapsed: 00:00:00.09
SYS@+ASM1>
這裡看到,資料庫使用的參數檔案是spfilelunar.ora,它是spfile.272.892409049的別名檔案。
我們在ASM中查看一下:
ASMCMD> pwd
+datadg2/lunar
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 Y    ARCHIVELOG/
                                                 Y    CONTROLFILE/
                                                 Y    DATAFILE/
                                                 Y    ONLINELOG/
                                                 Y    PARAMETERFILE/
                                                 Y    TEMPFILE/
                                                 N    spfilelunar.ora => +DATADG2/LUNAR/PARAMETERFILE/spfile.272.892409049
ASMCMD>   
我們將這個檔案複製到檔案系統,然後查看該檔案內容,以便確定是否為我們需要使用的資料庫的參數檔案:
1
ASMCMD> cp +DATADG2/LUNAR/PARAMETERFILE/spfile.272.892409049 /tmp/lunar.db.spfile
copying +DATADG2/LUNAR/PARAMETERFILE/spfile.272.892409049 -> /tmp/lunar.db.spfile
ASMCMD>
檢查資料庫的spfile的內容:
[root@lunar5 ~]# ll /tmp/lunar.db.spfile
-rw-r----- 1 grid oinstall 2560 Feb 15 21:51 /tmp/lunar.db.spfile
[root@lunar5 ~]# strings /tmp/lunar.db.spfile
*.audit_file_dest='/u01/app/oracle/admin/lunar/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+DATADG2/lunar/controlfile/current.256.892408309','+DATADG2/lunar/controlfile/current.257.892408311'
*.db_block_size=8192
*.db_cache_size=157286400
*.db_create_file_dest='+DATADG2'
*.db_domain=''
*.db_name='lunar'
*.db_recovery_file_dest='+DATADG2'
*.db_recovery_file_dest_size=4194304000
*.diagnostic_dest='/u01/app/oracle'
lunar2.instance_number=
lunar1.instance_number=1
*.java_pool_size=31457280
*.large_pool_size=31457280
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=228589568
*.processes=150
*.remote_listener='lunar-scan:1521'
*.remote_login_passwordfile='exclusive'
*.shared_pool_size=419430400
lunar2.thread=2
lunar1.thread=1
lunar2.undo_tablespace='UNDOTBS2'
lunar1.undo_tablespace='UNDOTBS1'
[root@lunar5 ~]#
這裡確定的,該檔案+datadg2/lunar/spfilelunar.ora(也就是+DATADG2/LUNAR/PARAMETERFILE/spfile.272.892409049)就是我們需要使用的資料庫參數檔案。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.