RAC環境中非歸檔改為歸檔模式
1.資料庫啟動到mount狀態
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 ONLINE ONLINE rac2
ora....b1.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....b2.inst application 0/5 0/0 ONLINE ONLINE rac2
[oracle@rac1 orafra]$ srvctl stop database -d racdb --關閉資料庫
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora....b1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....b2.inst application 0/5 0/0 OFFLINE OFFLINE
[oracle@rac1 orafra]$ srvctl start instance -d racdb -i racdb1 -o mount --例項1啟動到mount狀態
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora....b1.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....b2.inst application 0/5 0/0 OFFLINE OFFLINE
2.連線到例項1
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
racdb1
SQL> select status from v$instance; --mount狀態
STATUS
------------
MOUNTED
SQL> alter database archivelog; --改為歸檔模式
Database altered.
3.開啟資料庫
[oracle@rac1 orafra]$ srvctl stop instance -d racdb -i racdb1 --關閉節點1
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora....b1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....b2.inst application 0/5 0/0 OFFLINE OFFLINE
[oracle@rac1 orafra]$ srvctl start database -d racdb --開啟資料庫
例項2也改為了歸檔模式
4.檢視歸檔情況
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 23
Next log sequence to archive 24
Current log sequence 24
SQL> show parameter db_re
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u02/orafra
db_recovery_file_dest_size big integer 2G
[oracle@rac1 orafra]$ ll --現在還沒有歸檔檔案
total 4
drwxrwxr-x 2 oracle oinstall 4096 Sep 23 05:03 lost+found
--切換下歸檔檔案
SQL> alter system switch logfile;
System altered.
--再檢視下
[oracle@rac1 orafra]$ ll
total 8
drwxrwxr-x 2 oracle oinstall 4096 Sep 23 05:03 lost+found
drwxrwx--- 3 oracle oinstall 4096 Sep 26 10:21 RACDB
[oracle@rac1 2015_09_26]$ ll
total 35914
-rw-rw---- 1 oracle oinstall 36775936 Sep 26 10:21 o1_mf_1_24_c0d09vdk_.arc --產生了日誌檔案
在例項2上也切換下日誌檔案
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
racdb2
SQL> alter system switch logfile;
System altered.
[oracle@rac1 2015_09_26]$ ll
total 39563
-rw-rw---- 1 oracle oinstall 36775936 Sep 26 10:21 o1_mf_1_24_c0d09vdk_.arc
-rw-rw---- 1 oracle oinstall 3736064 Sep 26 10:23 o1_mf_2_3_c0d0f5vb_.arc
例項2的歸檔檔案也產生了.
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 ONLINE ONLINE rac2
ora....b1.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....b2.inst application 0/5 0/0 ONLINE ONLINE rac2
[oracle@rac1 orafra]$ srvctl stop database -d racdb --關閉資料庫
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora....b1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....b2.inst application 0/5 0/0 OFFLINE OFFLINE
[oracle@rac1 orafra]$ srvctl start instance -d racdb -i racdb1 -o mount --例項1啟動到mount狀態
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora....b1.inst application 0/5 0/0 ONLINE ONLINE rac1
ora....b2.inst application 0/5 0/0 OFFLINE OFFLINE
2.連線到例項1
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
racdb1
SQL> select status from v$instance; --mount狀態
STATUS
------------
MOUNTED
SQL> alter database archivelog; --改為歸檔模式
Database altered.
3.開啟資料庫
[oracle@rac1 orafra]$ srvctl stop instance -d racdb -i racdb1 --關閉節點1
[oracle@rac1 orafra]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.gsd application 0/5 0/0 ONLINE ONLINE rac1
ora.rac1.ons application 0/3 0/0 ONLINE ONLINE rac1
ora.rac1.vip application 0/0 0/0 ONLINE ONLINE rac1
ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.gsd application 0/5 0/0 ONLINE ONLINE rac2
ora.rac2.ons application 0/3 0/0 ONLINE ONLINE rac2
ora.rac2.vip application 0/0 0/0 ONLINE ONLINE rac2
ora.racdb.db application 0/1 0/1 OFFLINE OFFLINE
ora....b1.inst application 0/5 0/0 OFFLINE OFFLINE
ora....b2.inst application 0/5 0/0 OFFLINE OFFLINE
[oracle@rac1 orafra]$ srvctl start database -d racdb --開啟資料庫
例項2也改為了歸檔模式
4.檢視歸檔情況
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 23
Next log sequence to archive 24
Current log sequence 24
SQL> show parameter db_re
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u02/orafra
db_recovery_file_dest_size big integer 2G
[oracle@rac1 orafra]$ ll --現在還沒有歸檔檔案
total 4
drwxrwxr-x 2 oracle oinstall 4096 Sep 23 05:03 lost+found
--切換下歸檔檔案
SQL> alter system switch logfile;
System altered.
--再檢視下
[oracle@rac1 orafra]$ ll
total 8
drwxrwxr-x 2 oracle oinstall 4096 Sep 23 05:03 lost+found
drwxrwx--- 3 oracle oinstall 4096 Sep 26 10:21 RACDB
[oracle@rac1 2015_09_26]$ ll
total 35914
-rw-rw---- 1 oracle oinstall 36775936 Sep 26 10:21 o1_mf_1_24_c0d09vdk_.arc --產生了日誌檔案
在例項2上也切換下日誌檔案
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
racdb2
SQL> alter system switch logfile;
System altered.
[oracle@rac1 2015_09_26]$ ll
total 39563
-rw-rw---- 1 oracle oinstall 36775936 Sep 26 10:21 o1_mf_1_24_c0d09vdk_.arc
-rw-rw---- 1 oracle oinstall 3736064 Sep 26 10:23 o1_mf_2_3_c0d0f5vb_.arc
例項2的歸檔檔案也產生了.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26937943/viewspace-1810125/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 非歸檔模式改為歸檔模式模式
- RAC 環境下修改歸檔模式模式
- 環境歸檔
- 改變歸檔模式,顯示歸檔資訊模式
- rac更改歸檔模式模式
- 修改11g RAC 為歸檔模式模式
- ORACLE資料庫歸檔改為非歸檔Oracle資料庫
- 【RAC】RAC環境下歸檔日誌格式約定
- RAC(ASM)歸檔模式修改ASM模式
- 【ARCHIVE】單機環境修改資料庫為歸檔模式Hive資料庫模式
- rac+dg環境刪除歸檔日誌
- ORACLE RAC模式下歸檔模式和非歸檔模式的切換方法Oracle模式
- oracle RAC開啟歸檔模式Oracle模式
- 【ARCHIVE】單機環境修改資料庫為非歸檔模式Hive資料庫模式
- Oracle歸檔模式和非歸檔模式Oracle模式
- Oracle11gR2 RAC環境歸檔模式的配置案例一則Oracle模式
- 改變oracle10g rac(rhel4)歸檔模式Oracle模式
- Oracle RAC 歸檔與非歸檔切換Oracle
- 10g , 11g RAC 環境下開啟歸檔模式的方法模式
- 歸檔模式模式
- 歸檔模式與非歸檔模式的切換模式
- Oracle歸檔模式與非歸檔模式設定Oracle模式
- RAC下啟動日誌歸檔模式模式
- Oracle9i RAC 更改歸檔模式Oracle模式
- RAC環境歸檔NFS掛載方式RMAN備份錯誤NFS
- Oracle歸檔模式和非歸檔模式的區別Oracle模式
- 更改ORACLE歸檔路徑及歸檔模式Oracle模式
- Oracle 歸檔與非歸檔模式的更改Oracle模式
- Oracle 11g資料庫改為非歸檔模式Oracle資料庫模式
- oracle 11gR2 改資料庫為歸檔模式Oracle資料庫模式
- 【轉】雙節點RAC下將資料庫從非歸檔模式更改到歸檔模式資料庫模式
- oracle歸檔模式Oracle模式
- Oracle 歸檔模式Oracle模式
- 更改資料庫為歸檔模式資料庫模式
- oracle11g RAC 啟動歸檔模式Oracle模式
- LINUX平臺上RAC開歸檔模式Linux模式
- oracle 10g rac 啟用歸檔模式Oracle 10g模式
- 改變歸檔檔案路徑