11G RAC 更改歸檔方式

初始狀態:兩節點數據庫都在正常open狀態.
[1 節點]SQL> alter system set log_archive_dest_1='LOCATION=+ARC' sid='*' scope=spfile;

System altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.


Total System Global Area 9620824064 bytes

Fixed Size                  2229544 bytes

Variable Size            3288337112 bytes

Database Buffers         6308233216 bytes

Redo Buffers               22024192 bytes

Database mounted.

SQL> alter database archivelog;

alter database archivelog

*

ERROR at line 1:

ORA-01126: database must be mounted in this instance and not open in any instance

[2 節點]SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

[1 節點]SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            +ARC

Oldest _disibledevent="#0000f0">Next log sequence to archive   81

Current log sequence           81

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.


[2 節點]SQL> startup;  

ORACLE instance started.

Total System Global Area 9620824064 bytes

Fixed Size                  2229544 bytes

Variable Size            3288337112 bytes

Database Buffers         6308233216 bytes

Redo Buffers               22024192 bytes

Database mounted.

Database opened.

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.


驗證歸檔存在:

grid:/oracle11g/app/grid/log/gapsdb1/gipcd$asmcmd

ASMCMD> cd A*

ASMCMD> ls

GAPS32DB/

ASMCMD> cd G*

ASMCMD> ls

ARCHIVELOG/

ASMCMD> cd *

ASMCMD> ls

2013_08_13/

ASMCMD> cd 2*

ASMCMD> ls -lrt

WARNING:option 'r' is deprecated for 'ls'

please use 'reverse'


Type        Redund  Striped  Time             Sys  Name

ARCHIVELOG  UNPROT  COARSE   AUG 13 10:00:00  Y    thread_1_seq_81.257.823342577

ARCHIVELOG  UNPROT  COARSE   AUG 13 10:00:00  Y    thread_1_seq_82.258.823342611

ARCHIVELOG  UNPROT  COARSE   AUG 13 10:00:00  Y    thread_2_seq_5.256.823342473

ARCHIVELOG  UNPROT  COARSE   AUG 13 10:00:00  Y    thread_2_seq_6.259.823342653



過程用文字表述即:

1.改歸檔目錄,alter system set log_archive_dest_1='LOCATION=+ARC' sid='*' scope=spfile;

2.停db1,db2

3.啓動db1或db2其中之一

4.startup mount

5.alter database archivelog;

6.alter database open;

7.啓動另一個實例,歸檔測試驗證

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章