配置遠(yuǎn)程歸檔
與本地歸檔一樣,遠(yuǎn)程歸檔也是配置在dmarch.ini文件中,遠(yuǎn)程歸檔相關(guān)的主要幾個(gè)配置項(xiàng)包括:
1. ARCH_TYPE設(shè)置為REMOTE,表示是遠(yuǎn)程歸檔
2. ARCH_DEST設(shè)置為遠(yuǎn)程數(shù)據(jù)庫實(shí)例名,表示REDO日志發(fā)送到這個(gè)節(jié)點(diǎn)
3. ARCH_INCOMING_PATH設(shè)置為本地存儲(chǔ)路徑,用于保存ARCH_DEST實(shí)例發(fā)送的REDO日志
一般建議DMRAC集群中的節(jié)點(diǎn),在配置本地歸檔之外,再交叉配置集群中所有其他節(jié)點(diǎn)的遠(yuǎn)程歸檔。查詢V$DM_ARCH_INI、V$ARCH_STATUS等動(dòng)態(tài)視圖可以獲取歸檔配置以及歸檔狀態(tài)等相關(guān)信息。下面以兩節(jié)點(diǎn)DMRAC集群為例,說明如何配置遠(yuǎn)程歸檔,RAC0和RAC1是DMRAC集群中的兩個(gè)實(shí)例,交叉進(jìn)行REMOTE歸檔配置:
1)修改數(shù)據(jù)庫為MOUNT狀態(tài)。
rac0實(shí)例:
SQL> alter database mount; executed successfully used time: 00:00:01.852. Execute id is 0.
rac1實(shí)例:
SQL> alter database mount; executed successfully used time: 00:00:01.853. Execute id is 0.
2)配置本地歸檔。
rac0實(shí)例:
SQL> alter database add archivelog 'dest=/dm7/data/rac0_arch,type=local,file_size=256,space_limit=0'; executed successfully used time: 3.459(ms). Execute id is 0.
rac1實(shí)例:
SQL> alter database add archivelog 'dest=/dm7/data/rac1_arch,type=local,file_size=256,space_limit=0'; executed successfully used time: 3.000(ms). Execute id is 0.
3)配置遠(yuǎn)程歸檔。
rac0實(shí)例:
SQL> alter database add archivelog 'dest=RAC1,type=remote,file_size=256,space_limit=0,incoming_path=/dm7/data/rac1_arch'; executed successfully used time: 2.836(ms). Execute id is 0.
rac1實(shí)例:
SQL> alter database add archivelog 'dest=RAC0,type=remote,file_size=256,space_limit=0,incoming_path=/dm7/data/rac0_arch'; executed successfully used time: 2.865(ms). Execute id is 0.
4)開啟歸檔模式。
rac0實(shí)例:
SQL> alter database archivelog; executed successfully used time: 11.553(ms). Execute id is 0.
rac1實(shí)例:
SQL> alter database archivelog; executed successfully used time: 10.644(ms). Execute id is 0.
5)修改數(shù)據(jù)庫為OPEN狀態(tài)。
rac0實(shí)例:
SQL> alter database open; executed successfully used time: 00:00:01.362. Execute id is 0.
rac1實(shí)例:
SQL> alter database open; executed successfully used time: 00:00:02.341. Execute id is 0.
6)查看歸檔配置文件dmarch.ini
rac0實(shí)例:
[dmdba@dmrac1 rac0_config]$ pwd /dm7/data/rac0_config [dmdba@dmrac1 rac0_config]$ cat dmarch.ini #DaMeng Database Archive Configuration file #this is comments ARCH_WAIT_APPLY = 1 [ARCHIVE_LOCAL1] ARCH_TYPE = LOCAL ARCH_DEST = /dm7/data/rac0_arch ARCH_FILE_SIZE = 256 ARCH_SPACE_LIMIT = 0 [ARCH_REMOTE1] ARCH_TYPE = REMOTE ARCH_DEST = RAC1 ARCH_INCOMING_PATH = /dm7/data/rac1_arch ARCH_FILE_SIZE = 256 ARCH_SPACE_LIMIT = 0
rac1實(shí)例:
[dmdba@dmrac2 rac1_config]$ pwd /dm7/data/rac1_config [dmdba@dmrac2 rac1_config]$ cat dmarch.ini #DaMeng Database Archive Configuration file #this is comments ARCH_WAIT_APPLY = 1 [ARCHIVE_LOCAL1] ARCH_TYPE = LOCAL ARCH_DEST = /dm7/data/rac1_arch ARCH_FILE_SIZE = 256 ARCH_SPACE_LIMIT = 0 [ARCH_REMOTE1] ARCH_TYPE = REMOTE ARCH_DEST = RAC0 ARCH_INCOMING_PATH = /dm7/data/rac0_arch ARCH_FILE_SIZE = 256 ARCH_SPACE_LIMIT = 0
7)檢查ARCH_INI參數(shù)是否為1
rac0實(shí)例:
SQL> select * from v$dm_ini where para_name='ARCH_INI'; LINEID PARA_NAME PARA_VALUE MIN_VALUE MAX_VALUE MPP_CHK SESS_VALUE FILE_VALUE DESCRIPTION PARA_TYPE ---------- --------- ---------- --------- --------- ------- ---------- ---------- ----------- --------- 1 ARCH_INI 1 0 1 N 1 1 dmarch.ini SYS used time: 10.267(ms). Execute id is 9.
rac1實(shí)例:
SQL> select * from v$dm_ini where para_name='ARCH_INI'; LINEID PARA_NAME PARA_VALUE MIN_VALUE MAX_VALUE MPP_CHK SESS_VALUE FILE_VALUE DESCRIPTION PARA_TYPE ---------- --------- ---------- --------- --------- ------- ---------- ---------- ----------- --------- 1 ARCH_INI 1 0 1 N 1 1 dmarch.ini SYS used time: 30.225(ms). Execute id is 19.
8)檢查是否生成了歸檔日志文件(在打開數(shù)據(jù)庫時(shí)就會(huì)生成)
本地歸檔日志文件
rac0實(shí)例:
[dmdba@dmrac1 rac0_arch]$ pwd /dm7/data/rac0_arch [dmdba@dmrac1 rac0_arch]$ ls -lrt total 136 -rw-r--r-- 1 dmdba dinstall 268435456 May 28 20:21 ARCHIVE_LOCAL1_20200528202150715_0.log
rac1實(shí)例:
[dmdba@dmrac2 rac1_arch]$ pwd /dm7/data/rac1_arch [dmdba@dmrac2 rac1_arch]$ ls -lrt total 136 -rw-r--r-- 1 dmdba dinstall 268435456 May 28 20:21 ARCHIVE_LOCAL1_20200528202151877_1.log
遠(yuǎn)程歸檔日志文件
rac0實(shí)例:
[dmdba@dmrac1 rac1_arch]$ pwd /dm7/data/rac1_arch [dmdba@dmrac1 rac1_arch]$ ls -lrt total 136 -rw-r--r-- 1 dmdba dinstall 268435456 May 28 20:21 ARCH_REMOTE1_20200528202146001_1.log
rac1實(shí)例:
[dmdba@dmrac2 rac0_arch]$ pwd /dm7/data/rac0_arch [dmdba@dmrac2 rac0_arch]$ ls -lrt total 136 -rw-r--r-- 1 dmdba dinstall 268435456 May 28 20:21 ARCH_REMOTE1_20200528202156601_0.log
網(wǎng)站題目:DM7配置遠(yuǎn)程歸檔-創(chuàng)新互聯(lián)
瀏覽路徑:http://www.rwnh.cn/article44/doepee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)、網(wǎng)站改版、網(wǎng)站排名、網(wǎng)站策劃、品牌網(wǎng)站設(shè)計(jì)、網(wǎng)站設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容