Oracle 10gR2 RAC+ASM 歸檔設定
本文 來源網路
Oracle 10gR2 RAC+ASM 歸檔設定示例
從Oracle 10gR2開始,對於RAC資料庫設定歸檔模式非常方便,只需要在其中任何一個節點上操作,剩餘節點instance關閉即可,下面是一個Oracle 10.2.0.2
版本2個節點的RAC資料庫開啟歸檔模式的示例,歸檔存放在FRA磁碟組下的demo目錄下
第一步:規劃目錄
例項1的歸檔路徑:+FRA/demo/arch1
例項2的歸檔路徑:+FRA/demo/arch2
[oracle@rac02] /home/oracle> export ORACLE_SID=+ASM2
[oracle@rac02] /home/oracle> asmcmd
ASMCMD> ls
DATA/
FRA/
ASMCMD> cd FRA
ASMCMD> mkdir demo
ASMCMD> cd demo
ASMCMD> mkdir arch1 arch2
ASMCMD> ls -ltr
Type Redund Striped Time Sys Name
N arch1/
N arch2/
ASMCMD>
第二步:關閉例項2
[oracle@rac02] /home/oracle> sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Sat Oct 9 18:07:16 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
在節點1上確認例項2已經關閉
[oracle@rac01] /home/oracle> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.demo.db application ONLINE ONLINE rac02
ora....o1.inst application ONLINE ONLINE rac01
ora....o2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
第三步:設定歸檔引數
在例項1上操作即可
[oracle@rac01] /home/oracle> sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Sat Oct 9 18:07:51 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> show parameter cluster_database
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string demo1
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 3
Current log sequence 4
SQL> alter system set log_archive_dest_1='LOCATION=+FRA/demo/arch1' sid='demo1';
System altered.
SQL> alter system set log_archive_dest_1='LOCATION=+FRA/demo/arch2' sid='demo2';
System altered.
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string LOCATION=+FRA/demo/arch1
log_archive_dest_10 string
第四步:開啟歸檔模式
繼續在例項1上操作
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 218103808 bytes
Fixed Size 1260032 bytes
Variable Size 75499008 bytes
Database Buffers 138412032 bytes
Redo Buffers 2932736 bytes
Database mounted.
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 +FRA/demo/arch1
Oldest online log sequence 3
Next log sequence to archive 4
Current log sequence 4
SQL>
好了,到這裡就按照我預先的規劃把這個2個節點的RAC資料庫開啟到歸檔模式下了,歸檔檔案存放在FRA磁碟組中.
第五步:開啟剩餘例項
[oracle@rac01] /home/oracle> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.demo.db application ONLINE ONLINE rac02
ora....o1.inst application ONLINE ONLINE rac01
ora....o2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
[oracle@rac01] /home/oracle> srvctl start instance -d demo -i demo2
[oracle@rac01] /home/oracle> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.demo.db application ONLINE ONLINE rac02
ora....o1.inst application ONLINE ONLINE rac01
ora....o2.inst application ONLINE ONLINE rac02
ora....SM1.asm application ONLINE ONLINE rac01
ora....01.lsnr application ONLINE ONLINE rac01
ora.rac01.gsd application ONLINE ONLINE rac01
ora.rac01.ons application ONLINE ONLINE rac01
ora.rac01.vip application ONLINE ONLINE rac01
ora....SM2.asm application ONLINE ONLINE rac02
ora....02.lsnr application ONLINE ONLINE rac02
ora.rac02.gsd application ONLINE ONLINE rac02
ora.rac02.ons application ONLINE ONLINE rac02
ora.rac02.vip application ONLINE ONLINE rac02
[oracle@rac01] /home/oracle>
第六步:測試驗證
[oracle@rac01] /home/oracle> sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Sat Oct 9 18:26:51 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> alter system archive log current;
System altered.
SQL>ASMCMD> pwd
+FRA/demo/arch1
ASMCMD> ls -ltr
Type Redund Striped Time Sys Name
N 1_4_731958872.dbf => +FRA/demo/ARCHIVELOG/2010_10_09/thread_1_seq_4.256.731960815
ASMCMD> cd ..
ASMCMD> cd arch2
ASMCMD> ls -ltr
Type Redund Striped Time Sys Name
N 2_2_731958872.dbf => +FRA/demo/ARCHIVELOG/2010_10_09/thread_2_seq_2.257.731960817
ASMCMD> [oracle@rac02] /home/oracle> sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.2.0 - Production on Sat Oct 9 18:34:17 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA/demo/arch2
Oldest online log sequence 2
Next log sequence to archive 3
Current log sequence 3
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15187685/viewspace-754384/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- 設定Oracle9i為自動歸檔模式Oracle模式
- oracle歸檔Oracle
- Oracle RAC啟動歸檔時需要設定CLUSTER_DATABASE引數嗎?OracleDatabase
- 在Oracle中,如何定時刪除歸檔日誌檔案?Oracle
- oracle歸檔日誌Oracle
- Oracle Linux 6.5 安裝Oracle 10gR2LinuxOracle 10g
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- 歸檔oracle alert日誌Oracle
- Oracle歸檔日誌清理Oracle
- Oracle:歸檔量統計Oracle
- ORACLE NBU調取oracle rman指令碼備份歸檔不自動刪除歸檔Oracle指令碼
- 咦?Oracle歸檔檔案存哪了?Oracle
- Oracle 歸檔使用情況分析Oracle
- Oracle dg歸檔同步失敗Oracle
- Rman在run命令塊裡臨時設定歸檔目錄,歸檔日誌能否恢復主要看預設的歸檔路徑
- LightBD/PostgreSQL資料庫設定歸檔保留時間SQL資料庫
- oracle 11g開啟歸檔模式及修改歸檔目錄Oracle模式
- oracle rman 刪除過期的歸檔Oracle
- Oracle 12c 關閉歸檔模式Oracle模式
- oracle11G歸檔日誌管理Oracle
- Oracle實驗8--Merge與歸檔Oracle
- oracle dg 歸檔日誌恢復情況Oracle
- oracle 刪除過期的歸檔日誌Oracle
- 【SQL】Oracle 歸檔日誌暴增原因分析SQLOracle
- Oracle歸檔日誌暴增排查優化Oracle優化
- Oracle RAC 11gR2開啟歸檔Oracle
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- Oracle歸檔檔案丟失導致OGG不用啟動Oracle
- iOS學習筆記15 序列化、偏好設定和歸檔iOS筆記
- Oracle GoldenGate同步服務歸檔空間維護OracleGo
- Oracle檢視歸檔是否被備庫應用Oracle
- Oracle DataGuard歸檔日誌丟失處理方法Oracle
- Oracle資料庫歸檔模式的切換ELOracle資料庫模式
- oracle adg備庫歸檔滿了無法同步Oracle
- oracle資料庫歸檔日誌量陡增分析Oracle資料庫
- win10系統下怎麼設定outlook 2016自動歸檔Win10
- 清除Oracle控制檔案中的歸檔資訊v$archived_logOracleHive
- oracle 如何不備份已經備份的歸檔Oracle