Oracle設定RAC的歸檔模式

來源:互聯網
上載者:User

資料庫建立後預設為非歸檔模式,為了使用RMAN執行熱備份,需要手工將資料庫切換成歸檔模式。通常情況下,歸檔模式的切換需要在資料庫處於MOUNT EXCLUSIVE的狀態下進行。

RAC的特殊之處在於,在RAC環境下,無法以MOUNT EXCLUSIVE方式來啟動歸檔模式,必須先禁用CLUSTER_DATABASE參數,資料庫成功修改為歸檔模式後再啟動CLUSTER_DATABASE參數。

以下所有操作建議直接在伺服器上進行操作,具體步驟如下:

$ sqlplus / nolog

SQL>conn / as sysdba

1) 在節點1上,修改cluster_database參數為false

SQL>alter system set cluster_database=false scope=spfile;

2) 在節點1上,修改archive的預設參數,以下是必須修改的三個參數

SQL>alter system set log_archive_format= ‘ora92%t_%s_%r.log’ scope=spfile;

SQL>alter system set log_archive_start= TRUE scope=spfile;

SQL>alter system set log_archive_dest_1=’file path’ scope=spfile;

3) 將所有節點資料庫停掉

SQL>shutdown immediate;

4) 在節點1上,將資料庫以mount方式啟動

SQL>startup mount;

5) 在節點1上,將資料庫修改為archivelog方式

SQL>alter database archivelog;

6) 在節點1上,開啟資料庫

SQL>alter database open;

7) 在節點1上,修改cluster_database參數為true

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

8) 在節點1上,停掉資料庫

SQL>shutdown immediate;

9) 將所有節點資料庫正常啟動

SQL>startup;

10) 檢查資料庫是否已經是archivelog mode

SQL>archive log list;

Database log mode Archive Mode

如果顯示結果第一行如上所示,說明已經是archivelog mode

聯繫我們

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