Oralce 10g rac 歸檔模式修改

來源:互聯網
上載者:User

這幾天一直想修改rac歸檔模式,一直沒有搞,今早起來參照以下文檔,並增加自己的一些操作,更改成功,意在為以後出現此問題可以直接使用解決問題,其中紅色字型為自己按本機操作的。

1. 在其中一個節點中檢查是否處于歸檔模式
SQL> archive log list;

Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /Oracle/product/database/dbs/arch
Oldest online log sequence     3
Current log sequence           4

2. 查看並修改 cluster_database參數

SQL> show parameter cluster_database;

NAME                                 TYPE        VALUE
———————————— ———– ——————————
cluster_database                     boolean     TRUE   <——-此處修改為false
cluster_database_instances           integer     2
2.1 執行如下命令使各節點的cluster_database參數為false

SQL> alter system set cluster_database=false scope=spfile sid=’*';

註明:*代表原生sid
3. 在各節點中關閉執行個體
SQL> shutdown immediate;   <—- RAC1
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> shutdown immediate;   <— RAC2
Database closed.
Database dismounted.
ORACLE instance shut down.

4.將其中1個節點啟動到 mount狀態,以RAC1為例

SQL> startup nomount;
ORACLE instance started.

Total System Global Area  281018368 bytes
Fixed Size                  1267044 bytes
Variable Size             113248924 bytes
Database Buffers          163577856 bytes
Redo Buffers                2924544 bytes
SQL> alter database mount;

Database altered.

5. 修改歸檔模式並

SQL> alter database archivelog;--->這個命令我經常忘

Database altered.
6. 將資料庫置於open狀態

SQL> alter database open;

Database altered.

6.1 指定歸檔目標

SQL> alter system set LOG_ARCHIVE_DEST_1=’LOCATION=/archive’;

System altered.

註明:如果上面指定的目錄一下需要用root使用者建立,並用chown -R oracle:dba /archive ,我分別在兩個結點上建立這個目錄,

當指定後,然後切換日誌就可以到看在該目錄產生相應的檔案。(alter system switch logfile;)

7. 查看cluster_database參數為false

SQL> show parameter cluster_database;

NAME                                 TYPE        VALUE
———————————— ———– ——————————
cluster_database                     boolean     FALSE
cluster_database_instances           integer     1
  7.1 這時如果啟動另一節點會報錯 
     
      SQL> startup nomount;  —> RAC2 節點置於nomount或startup會報錯如:
           ORA-29707: inconsistent value 2 for initialization parameter
           cluster_database_instances with other instances

  • 1
  • 2
  • 下一頁

聯繫我們

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