签到成功

知道了

CNDBA社区CNDBA社区

达梦 DM8 联机备份 [-731]:归档日志重叠. 错误解决方法

2023-03-19 21:45 1064 0 原创 DM 达梦
作者: dave

1 错误现象

在达梦DMDSC 集群中执行联机备份,报如下错误:http://www.cndba.cn/dave/article/116498

http://www.cndba.cn/dave/article/116498

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.

虽然启动了归档,但理论上执行全备,即使重叠也应该不受影响,归档文件如下:http://www.cndba.cn/dave/article/116498http://www.cndba.cn/dave/article/116498

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 解决方法

本来想既然提示归档日志重叠,就想把归档日志删了。http://www.cndba.cn/dave/article/116498http://www.cndba.cn/dave/article/116498

http://www.cndba.cn/dave/article/116498

DM 达梦数据库 归档文件 删除 说明
https://www.cndba.cn/cndba/dave/article/3880http://www.cndba.cn/dave/article/116498http://www.cndba.cn/dave/article/116498

后来又试了把备份命令写全,居然成功了:

http://www.cndba.cn/dave/article/116498

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>

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2248
    原创
  • 3
    翻译
  • 557
    转载
  • 188
    评论
  • 访问:7224415次
  • 积分:4284
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ