oracle rac重建控制檔案

來源:互聯網
上載者:User

標籤:

1.使用sqlplus串連到已經mount或open的rac資料庫

sql> alter database backup controlfile to trace noresetlogs;

2.找出對應的trace檔案
3.編寫指令碼control.sql

startup nomountcreate controlfile reuse database "orcl" noresetlogs noarchivelogmaxlogfiles 192maxlogmembers 3maxdatafiles 1024maxinstances 32maxloghistory 292logfilegroup 1 ‘/ocfs01/rac/redo01.log‘ size 50m,group 2 ‘/ocfs01/rac/redo02.log‘ size 50m,group 3 ‘/ocfs01/rac/redo03.log‘ size 50m,group 4 ‘/ocfs01/rac/redo04.log‘ size 50m-- standby logfiledatafile‘/ocfs01/rac/system01.dbf‘,‘/ocfs01/rac/undotbs01.dbf‘,‘/ocfs01/rac/sysaux01.dbf‘,‘/ocfs01/rac/undotbs02.dbf‘,‘/ocfs01/rac/users01.dbf‘character set we8iso8859p1recover databasealter database open;alter tablespace temp add tempfile ‘/ocfs01/rac/temp01.dbf‘size 167772160 reuse autoextend off;recover databasealter database open;alter tablespace temp add tempfile ‘/ocfs01/rac/temp01.dbf‘size 524288000 reuse autoextend on next 655360 maxsize 32767m;-- the next step is optional if gv$thread does not show all the threads:-- alter database enable public thread 2;-- repeat for other threads if applicable

4.關閉資料庫所有執行個體

$ srvctl stop database -d orcl -o immediate

5.備份當前的控制檔案

6.確保執行個體設定都是針對thread 1

instance = 1thread = 1

7.將參數檔案中的cluster_database設定為false
如果是使用spfile:

sql> startup nomountsql> alter system set cluster_database=false scope=spfile;sql> shutdown

8.運行指令碼建立新的控制檔案

sqlplus / as sysdbaSQL> @control.sql

9.將參數cluster_database設定為true

sql> alter system set cluster_database=true scope=spfile;

10.關閉資料庫

sql> shutdown immediate

11.啟動所有執行個體

$ srvctl start database -d orcl$ srvctl status database -d orcl

12.備份資料庫

 

oracle rac重建控制檔案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.