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

报错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’;

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


时间: 2024-12-26 05:35:35

rman还原数据库数据库报错问题处理的相关文章

数据库日志报错问题分析

Thread 1 cannot allocate new log, sequence 466 Private strand flush not complete Current log# 7 seq# 465 mem# 0: /home/app/oracle/oradata/orcl/redo07.log Thread 1 advanced to log sequence 466 (LGWR switch) Current log# 8 seq# 466 mem# 0: /home/app/or

导入MySQL测试数据库employee报错

导入MySQL测试数据库employee 报错 下载地址:https://launchpad.net/test-db/ 上传解压: [[email protected] ~]# tar xf employees_db-full-1.0.6.tar.bz2 [[email protected] ~]# cd employees_db 使用mysql命令行工具,导入建库建表语句和数据 employee.sql中是建库建表语句,默认使用的是InnoDB引擎,可以自行修改 [[email protect

数据库open报错ORA-01555: snapshot too old

原文博客链接地址:数据库open报错ORA-01555: snapshot too old 今天正在东莞蜜月的时候,一个学生说他管理的测试库出问题了,无法open,我们先来看看是什么问题: Recovery of Online Redo Log: Thread 1 Group 4 Seq 4 Reading mem 0 Mem# 0: /onlinelog/shr/redo04.log Completed redo application of 0.00MB Completed crash re

navicat 连接oracle 数据库会报错

navicat 直连oracle 数据库会报错 ORA-12737 Instant Client Light:unsupported server character set ZHS16GBK 今天使用Navicat连接Oracle数据库,报了下面的这个错误:“ORA-12737 Instant Client Light:unsupported server character set ZHS16GBK” 从这个错误上看,可以知道是客户端不支持服务器端的字符集造成的,但是修改服务器端的字符集是不

数据库打开报错: 值不能为空

报错信息如下: 数据库客户端打不开 解决方案: 找到下面的目录C:\Users\<username>\AppData\Local\Temp 创建一个空文件夹 名称是: 2 重新打开数据库 数据库打开报错: 值不能为空

oracle数据库启动报错,不能启动ASM实例

数据库rac启动时报错,日志如下,后来使用 Sat Jun  7 06:02:11 2014 GATHER_STATS_JOB encountered errors.  Check the trace file. Sat Jun  7 06:02:11 2014 Errors in file /oracle/product/admin/dqb/bdump/dqb2_j001_13352.trc: ORA-08103: object no longer exists Sat Jun  7 06:0

查询数据库语句报错“数据类型 text 和 varchar 在 equal to 运算符中不兼容。&quot;

问题:查询数据库语句报错"数据类型 text 和 varchar 在 equal to 运算符中不兼容." 解决: select * from 表名称 where cast(查询的字段名称 as varchar(max)) ='查询的值'

11gR2数据库日志报错:Fatal NI connect error 12170、

11gR2数据库日志报错:Fatal NI connect error 12170.TNS-12535.TNS-00505 [问题点数:100分,结帖人MarkIII] 不显示删除回复             显示所有回复             显示星级回复             显示得分回复             只显示楼主           收藏 关注 MarkIII MarkIII 等级: 结帖率:98.94% 楼主发表于: 2011-05-13 10:33:10 Fatal NI

django配置使用mysql数据库运行报错:django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named &#39;MySQLdb&#39;

今天在把django的默认数据库sqlite3切换为MySQL数据库时报错:django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named 'MySQLdb' 报错原因:django虚拟环境没有安装pymysql模块 解决: 先安装pymysql:pip install pymysql 然后在项目的 init.py 文件中添加以下代码: 把django的默认数据库sqlite3切

连接不上本地数据库,报错:2003

今天启动一个项目报错如下: 查了一些资料说数据库没有启动,然后发现启动不了数据库并报错:   2003 启动数据库可以用命令提示符: net start mysql 或者找到如下位置:电脑->管理-> 进入如下界面找到mysql的服务启动即可 想起来自己将数据库的文件位置进行了改动 所以改了MySQL的环境变量,重新启动即可 原文地址:https://www.cnblogs.com/ywqtro/p/12343727.html