Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

DM7 configuration remote Archive

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Configure remote archiving

Like local archiving, remote archiving is also configured in dmarch.ini files, and the main configuration items related to remote archiving include:

1. Set ARCH_TYPE to REMOTE, which means remote archiving

2. ARCH_DEST is set to the remote database instance name, which means that REDO logs are sent to this node

3. ARCH_INCOMING_PATH is set to the local storage path, which is used to save REDO logs sent by ARCH_DEST instances.

It is generally recommended that nodes in a DMRAC cluster cross-configure remote archives for all other nodes in the cluster in addition to local archiving. Query V$DM_ARCH_INI, V$ARCH_STATUS and other dynamic views to obtain archive configuration, archive status and other related information. The following shows how to configure remote archiving by taking a two-node DMRAC cluster as an example. RAC0 and RAC1 are two instances in a DMRAC cluster and cross-configure REMOTE archiving:

1) modify the database to MOUNT state.

Rac0 instance:

SQL > alter database mount;executed successfullyused time: 01.852. Execute id is 0.

Rac1 instance:

SQL > alter database mount;executed successfullyused time: 01.853. Execute id is 0.

2) configure local archiving.

Rac0 instance:

SQL > alter database add archivelog 'dest=/dm7/data/rac0_arch,type=local,file_size=256,space_limit=0';executed successfullyused time: 3.459 (ms). Execute id is 0.

Rac1 instance:

SQL > alter database add archivelog 'dest=/dm7/data/rac1_arch,type=local,file_size=256,space_limit=0';executed successfullyused time: 3.000 (ms). Execute id is 0.

3) configure remote archiving.

Rac0 instance:

SQL > alter database add archivelog 'dest=RAC1,type=remote,file_size=256,space_limit=0,incoming_path=/dm7/data/rac1_arch';executed successfullyused time: 2.836 (ms). Execute id is 0.

Rac1 instance:

SQL > alter database add archivelog 'dest=RAC0,type=remote,file_size=256,space_limit=0,incoming_path=/dm7/data/rac0_arch';executed successfullyused time: 2.865 (ms). Execute id is 0.

4) enable archiving mode.

Rac0 instance:

SQL > alter database archivelog;executed successfullyused time: 11.553 (ms). Execute id is 0.

Rac1 instance:

SQL > alter database archivelog;executed successfullyused time: 10.644 (ms). Execute id is 0.

5) modify the database to OPEN state.

Rac0 instance:

SQL > alter database open;executed successfullyused time: 01.362. Execute id is 0.

Rac1 instance:

SQL > alter database open;executed successfullyused time: 02.341. Execute id is 0.

6) View the archive configuration file dmarch.ini

Rac0 instance:

[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 instance:

[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) check whether the ARCH_INI parameter is 1

Rac0 instance:

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 10 1 N 1 1 dmarch.ini SYSused time: 10.267 (ms). Execute id is 9.

Rac1 instance:

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 01 N 1 1 dmarch.ini SYSused time: 30.225 (ms). Execute id is 19.

8) check if the archive log file is generated (when you open the database)

Local archive log file

Rac0 instance:

[dmdba@dmrac1 rac0_arch] $pwd/dm7/data/rac0_ Arch [dmdba @ dmrac1 rac0_arch] $ls-lrttotal 136Murray Rwmuri Rafael-1 dmdba dinstall 268435456 May 2820: 21 ARCHIVE_LOCAL1_20200528202150715_0.log

Rac1 instance:

[dmdba@dmrac2 rac1_arch] $pwd/dm7/data/rac1_ Arch [dmdba @ dmrac2 rac1_arch] $ls-lrttotal 136Murray Rwmuri Rafael-1 dmdba dinstall 268435456 May 2820: 21 ARCHIVE_LOCAL1_20200528202151877_1.log

Remote archive log file

Rac0 instance:

[dmdba@dmrac1 rac1_arch] $pwd/dm7/data/rac1_ Arch [dmdba @ dmrac1 rac1_arch] $ls-lrttotal 136Murray Rwmuri Rafael-1 dmdba dinstall 268435456 May 2820: 21 ARCH_REMOTE1_20200528202146001_1.log

Rac1 instance:

[dmdba@dmrac2 rac0_arch] $pwd/dm7/data/rac0_ Arch [dmdba @ dmrac2 rac0_arch] $ls-lrttotal 136Murray Rwmuri Rafael-1 dmdba dinstall 268435456 May 2820: 21 ARCH_REMOTE1_20200528202156601_0.log

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report