文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

rman还原数据库数据库报错问题处理

2024-04-02 19:55

关注

报错1、数据库开启block change tracking ,恢复完成后打开因文件不存在报错。


RMAN> alter database open resetlogs;


RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of alter db command at 10/25/2016 15:02:16

ORA-19751: could not create the change tracking file

ORA-19750: change tracking file: '+DATA/cx/changetracking/ctf.348.875544631'

ORA-17502: ksfdcre:4 Failed to create file +DATA/cx/changetracking/ctf.348.875544631

ORA-15046: ASM file name '+DATA/cx/changetracking/ctf.348.875544631' is not in single-file creation form

ORA-17503: ksfdopn:2 Failed to open file +DATA/cx/changetracking/ctf.348.875544631

ORA-15012: ASM file '+DATA/cx/changetracking/ctf.348.875544631' does not exist


RMAN>   


故障处理:

关闭block-change-track功能,只能在open或者mount状态修改。恢复时应该在还原结束后,打开数据库前关闭block-change-track功能。

$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Tue Oct 25 15:15:43 2016


Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

SQL> select status,filename from v$block_change_tracking;

select status,filename from v$block_change_tracking

                            *

ERROR at line 1:

ORA-19755: could not open change tracking file

ORA-19750: change tracking file:

'+DATA/cx/changetracking/ctf.348.875544631'

ORA-17503: ksfdopn:2 Failed to open file

+DATA/cx/changetracking/ctf.348.875544631

ORA-15012: ASM file '+DATA/cx/changetracking/ctf.348.875544631' does not

exist


SQL> alter database disable block change tracking;


Database altered.

该命令执行后,在警告日志中可以发现删除+DATA/cx/changetracking/ctf.348.875544631文件的语句。

SQL> alter database open;


Database altered.


SQL>

报错2

RMAN> restore database;


Starting restore at 2016-10-19 10:23:51

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=1933 instance=zx1 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=2319 instance=zx1 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=2705 instance=zx1 device type=DISK

allocated channel: ORA_DISK_4

channel ORA_DISK_4: SID=3091 instance=zx1 device type=DISK

released channel: ORA_DISK_1

released channel: ORA_DISK_2

released channel: ORA_DISK_3

released channel: ORA_DISK_4

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 10/19/2016 10:23:52

ORA-19554: error allocating device, device type: SBT_TAPE, device name: 

ORA-27211: Failed to load Media Management Library

Additional information: 2


RMAN> 

故障处理:

RMAN> show all;

RMAN configuration parameters for database with db_unique_name ZX are:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 60 DAYS;

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;

CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/snapcf_zx.f';

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_zx.f';


RMAN> show default device type;


RMAN configuration parameters for database with db_unique_name ZX are:

CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';


RMAN>

RMAN> configure channel device type 'SBT_TAPE' CLEAR;

old RMAN configuration parameters are successfully deleted

RMAN> show all;


RMAN configuration parameters for database with db_unique_name ZX are:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 60 DAYS;

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;

CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/snapcf_zx.f';

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_zx.f';



RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'disk';


old RMAN configuration parameters:

CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

new RMAN configuration parameters:

CONFIGURE DEFAULT DEVICE TYPE TO 'DISK';

new RMAN configuration parameters are successfully stored


RMAN> show all;

RMAN configuration parameters for database with db_unique_name ZX are:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 60 DAYS;

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO 'DISK';

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/snapcf_zx.f';

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_zx.f';

RMAN> 

完成后,退出后重新登录正常。


报错3:备份加密还原报错


RMAN> restore controlfile from '/dbbackup/CTL_ZX_8796_1_923736016.bak';


Starting restore at 2016-10-18 17:53:27

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=1547 instance=jxkzx1 device type=DISK


channel ORA_DISK_1: restoring control file

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 10/18/2016 17:53:29

ORA-19870: error while restoring backup piece /dbbackup/CTL_ZX_8796_1_923736016.bak

ORA-19913: unable to decrypt backup

ORA-28365: wallet is not open


RMAN> 

故障处理:



RMAN>set dencryption on identified by ‘123456’;

设置解密密码后,开始还原数据库。





阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯