10G RAC歸檔設定
首先檢視資料庫現有模式可使用以下語句:
select name,log_mode from v$database;
也可以用下面的語句:
archive log list;(該方法需要as sysdba)
10G RAC更改歸檔方式:
1、登入兩個例項後,在每個例項上執行:
shutdown immediate
2、開啟歸檔(在一個例項上執行):
startup mount
alter database archivelog;
alter database open;
3、關閉歸檔(在一個例項上執行):
startup mount
alter database noarchivelog;
alter database open;
4、在另一個例項上執行:
startup
[@more@]
最好重啟crs,使用sqlplus startup是使用pfile啟動的(沒有spfile)。
10G單庫更改歸檔位置:
alter system set log_archive_dest_1="location=/archive" scope=spfile;
注意:是雙引號,log_archive_dest_1不是log_archive_dest!!
10G RAC更改歸檔位置:
alter system set log_archive_dest_1="location=/archive" scope=spfile sid='*';
歸檔模式:
alter system set log_archive_format="%t_%s_%r.arch" scope=spfile sid='*';
10G中不需要設定LOG_ARCHIVE_START=true,10G中這個引數已廢棄!
注意:
如果歸檔使用nfs方式共享,在一個節點上訪問兩個兩個節點的歸檔日誌,配置如下:
alter system set log_archive_dest_1="location=/archive" scope=spfile sid='ysdb1';
alter system set log_archive_dest_1="location=/archive1" scope=spfile sid='ysdb2';
ysdb1的歸檔目錄/archive-->使用nfs掛載到ysdb2的/archive上
如果想在兩個節點上都能訪問另一個節點的歸檔,再將ysdb2的歸檔目錄/archive1-->使用nfs掛載到ysdb1的/archive1上
兩個節點的歸檔目錄必須配置成不一樣,然後按如上方式使用nfs掛載,否則recover的時候,會找不到某個節點的歸檔日誌!這樣設定無論在哪個節點上恢復都可以訪問另一個節點上的歸檔日誌。也可以只在某個節點ysdb2上使用nfs掛載ysdb1的歸檔目錄,這樣只能在ysdb2上訪問ysdb1的歸檔,在ysdb2上恢復。
oracle歸檔程式寫日誌到NFS檔案系統,與一般的在NFS檔案系統上透過命令新增刪除檔案是不同的,要在mount NFS檔案系統的時候指定一定的引數才能讓歸檔程式正常歸檔。
原來是這樣指定mount的:
mount -t nfs 192.168.0.21:/archive /archive
備份歸檔時報錯:
ORA-19625: error identifying file /archive/1_42_682943725.arch
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
需要增加mount引數:
Mount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 192.168.0.21:/archive /archive
指定引數後,歸檔程式就可以正常的在NFS檔案系統上歸檔了。
在oracle環境中使用NFS,在mount的時候需要修改一些選項,否則可能導致各種問題,比如ORA-27086和ORA-27054錯誤。不管你是將Oracle安裝在NFS裝置也好,是將datafile放置在NFS裝置也好,是備份到NFS裝置也好,如果出現相關的錯誤,則需要檢查下是否mount的選項有問題。一般只要用hard方式來mount的,都不會有太多問題。
以下內容引自Metalink(Doc ID:359515.1),適用於10.1.0.2以上版本,供參考:
RAC
In the table below
_ Binaries is the shared mount points where the Oracle Home and CRS_HOME is installed.
_ Datafiles includes Online Logs, Controlfile and Datafiles
Operating System | Mount options for Binaries | Mount options for Oracle Datafiles | Mount options for CRS Voting Disk and OCR |
Sun Solaris * | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, |
AIX (5L) ** | rw,bg,hard,nointr,rsize=32768, | cio,rw,bg,hard,nointr,rsize=32768, | cio,rw,bg,hard,intr,rsize=32768, |
HPUX 11.23 **** – | rw,bg,vers=3,proto=tcp,noac, | rw,bg,vers=3,proto=tcp,noac, | rw,bg,vers=3,proto=tcp,noac, |
Linux x86 | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, |
Linux x86-64 # | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, |
Linux - Itanium | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, |
* NFS mount option “forcedirectio” is required on Solaris platforms when mounting the OCR/CRS files when using Oracle 10.1.0.4 or 10.2.0.2 or later (Oracle unpublished bug 4466428)
** AIX is only supported with NAS on AIX 5.3 TL04 and higher with Oracle 10.2.0.1 and later (NetApp)
*** NAS devices are only supported with HPUX 11.23 or higher ONLY
# These mount options are forLinux kernels 2.6 and above for older kernels please check Note 279393.1
Due to Unpublished bug 5856342, it is necessary to use the following init.ora parameter when using NAS
with all versions of RAC on Linux (x86 & X86-64 platforms) until 10.2.0.4. This bug is fixed and included in 10.2.0.4 patchset.
filesystemio_options = DIRECTIO
Single Instance
Operating System | Mount options for Binaries | Mount options for Oracle Datafiles |
Sun Solaris * | rw,bg,hard,rsize=32768, | rw,bg,hard,rsize=32768, |
AIX (5L) ** | rw,bg,hard,rsize=32768, | rw,bg,hard,rsize=32768, |
HPUX 11.23 **** | rw,bg,hard,rsize=32768, | rw,bg,hard,rsize=32768, |
Linux x86 | rw,bg,hard,rsize=32768, | rw,bg,hard,rsize=32768, |
Linux x86-64 # | rw,bg,hard,rsize=32768, | rw,bg,hard,rsize=32768, |
Linux - Itanium | rw,bg,hard,rsize=32768, | rw,bg,hard,rsize=32768, |
* actime=0 or noac can be used
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/670493/viewspace-1024890/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE RAC 設定歸檔Oracle
- 10G設定歸檔
- RAC 設定NFS作為歸檔目錄NFS
- oracle 10G設定歸檔目錄及命令Oracle 10g
- oracle 10g rac 啟用歸檔模式Oracle 10g模式
- Oracle 10gR2 RAC+ASM 歸檔設定Oracle 10gASM
- 10g R2 RAC 歸檔模式開啟模式
- 設定歸檔模式模式
- oracle 歸檔設定Oracle
- 【RAC】RAC環境下歸檔日誌格式約定
- Oracle 10g RAC 網路設定Oracle 10g
- Oracle歸檔模式與非歸檔模式設定Oracle模式
- 歸檔模式的設定模式
- Oracle 10G RAC歸檔引數格式問題導致歸檔至ASM時出錯Oracle 10gASM
- Postgresql日誌歸檔設定SQL
- Oracle RAC啟動歸檔時需要設定CLUSTER_DATABASE引數嗎?OracleDatabase
- oracle 10g rac下啟動關閉與更改歸檔模式Oracle 10g模式
- Oracle RAC 歸檔與非歸檔切換Oracle
- rac更改歸檔模式模式
- DB2 設定歸檔模式DB2模式
- oracle自動歸檔的設定Oracle
- RAC環境中非歸檔改為歸檔模式模式
- oracle 10g rac ocfs或者asm 修改為歸檔模式操作步驟Oracle 10gASM模式
- 10G 歸檔相關
- RAC(ASM)歸檔模式修改ASM模式
- ORACLE RAC 啟用歸檔Oracle
- 【RAC】Oracle 10g RAC 重建控制檔案Oracle 10g
- 10g , 11g RAC 環境下開啟歸檔模式的方法模式
- 備份前先設定成歸檔模式模式
- sqlplus下設定歸檔模式SQL模式
- Oracle歸檔引數設定問題Oracle
- oracle 歸檔的一般設定Oracle
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- oracle 10g 歸檔日誌Oracle 10g
- 修改10g的歸檔地址
- rac使用預設閃回區歸檔空間滿
- oracle RAC開啟歸檔模式Oracle模式
- RAC 開啟歸檔日誌