1 错误现象
在达梦DMDSC 集群中执行联机备份,报如下错误:
SQL> BACKUP DATABASE BACKUPSET '/dm/dm_bak/db_full_bak_for_dsc';
BACKUP DATABASE BACKUPSET '/dm/dm_bak/db_full_bak_for_dsc';
[-731]:归档日志重叠.
已用时间: 00:00:01.155. 执行号:0.
虽然启动了归档,但理论上执行全备,即使重叠也应该不受影响,归档文件如下:
SQL> alter system switch logfile;
操作已执行
已用时间: 192.737(毫秒). 执行号:0.
SQL> select dsc_seqno,arch_seq,path,status,arch_lsn from v$arch_file order by 1,2;
行号 DSC_SEQNO ARCH_SEQ PATH STATUS ARCH_LSN
---------- ----------- -------------------- --------------------------------------------------------------------------- -------- --------------------
1 0 4132 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_20-43-08.log INACTIVE 25294
2 0 4134 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_20-46-44.log INACTIVE 27982
3 0 4141 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_20-53-32.log INACTIVE 28011
4 0 4141 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_20-53-33.log INACTIVE 28011
5 0 4146 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_21-04-46.log INACTIVE 29140
6 0 4160 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_21-13-01.log INACTIVE 31920
7 0 4165 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_21-13-19.log INACTIVE 33493
8 1 2467 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_20-45-54.log INACTIVE 26640
9 1 2467 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_20-45-52.log INACTIVE 26640
10 1 2473 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_21-01-13.log INACTIVE 29120
11 1 2474 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_21-05-00.log INACTIVE 30782
12 1 2479 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_21-13-17.log INACTIVE 33494
13 1 2479 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_21-13-19.log INACTIVE 33494
13 rows got
已用时间: 16.258(毫秒). 执行号:208.
2 解决方法
本来想既然提示归档日志重叠,就想把归档日志删了。
DM 达梦数据库 归档文件 删除 说明
https://www.cndba.cn/cndba/dave/article/3880
后来又试了把备份命令写全,居然成功了:
SQL> backup database full to "DB_DAMENG_FULL" backupset '/dm/dm_bak/db_full_bak_for_dsc';
操作已执行
已用时间: 00:00:01.569. 执行号:210.
这里的full 本来就是默认值,所以写不写理论都应该是一样的。 备份成功以后,再次使用之前的语法,也没有报错,所以也就没有必要再删归档了。 只能说这里有点诡异,先记录下来吧。
SQL> BACKUP DATABASE BACKUPSET '/dm/dm_bak/db_full_bak_for_dsc2';
操作已执行
已用时间: 00:00:01.552. 执行号:211.
SQL> select dsc_seqno,arch_seq,path,status,arch_lsn from v$arch_file order by 1,2;
行号 DSC_SEQNO ARCH_SEQ PATH STATUS ARCH_LSN
---------- ----------- -------------------- --------------------------------------------------------------------------- -------- --------------------
1 0 4132 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_20-43-08.log INACTIVE 25294
2 0 4134 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_20-46-44.log INACTIVE 27982
3 0 4141 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_20-53-33.log INACTIVE 28011
4 0 4141 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_20-53-32.log INACTIVE 28011
5 0 4146 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_21-04-46.log INACTIVE 29140
6 0 4160 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_21-13-01.log INACTIVE 31920
7 0 4165 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_21-13-19.log INACTIVE 33493
8 0 4174 +DMDATA/data/rac0/arch/ARCH_REMOTE1_0x6DF2B23B[0]_2023-03-19_21-26-43.log ACTIVE 34623
9 0 4174 +DMDATA/data/rac0/arch/ARCHIVE_LOCAL2_0x6DF2B23B[0]_2023-03-19_21-26-45.log ACTIVE 34623
10 1 2467 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_20-45-52.log INACTIVE 26640
11 1 2467 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_20-45-54.log INACTIVE 26640
12 1 2473 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_21-01-13.log INACTIVE 29120
13 1 2474 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_21-05-00.log INACTIVE 30782
14 1 2479 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_21-13-19.log INACTIVE 33494
15 1 2479 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_21-13-17.log INACTIVE 33494
16 1 2490 +DMDATA/data/rac1/arch/ARCH_REMOTE1_0x6DF2B23B[1]_2023-03-19_21-26-45.log ACTIVE 34625
17 1 2490 +DMDATA/data/rac1/arch/ARCHIVE_LOCAL1_0x6DF2B23B[1]_2023-03-19_21-26-43.log ACTIVE 34625
17 rows got
已用时间: 15.323(毫秒). 执行号:212.
SQL>
版权声明:本文为博主原创文章,未经博主允许不得转载。