oracle rman set newname时报错RMAN-06015

某数据库restore之后,尝试set newname但是报错RMAN-06015。我们可以先手工catalog进去,在set newname。

可以看如下的测试案例:

--1.纯粹的set newname是可以的

RMAN> run{
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
3> }
 
executing command: SET NEWNAME
 
RMAN>
 
RMAN>
 
RMAN>
 
RMAN>
 
RMAN>
 
 
--2. 但是switch之后,就不可以。这是因为在你当前控制文件中,找不到该文件(asm上的文件)的信息
RMAN> run{
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
3> switch datafile 6;
4> }
 
executing command: SET NEWNAME
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of switch command at 11/12/2014 10:36:09
RMAN-20230: datafile copy not found in the repository
RMAN-06015: error while looking up datafile copy name: /u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222
 
RMAN>
 
RMAN>
 
RMAN> -- 3.将该文件作为datafilecopy,catalog到控制文件中:
 
RMAN> catalog datafilecopy '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
 
cataloged datafile copy
datafile copy file name=/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222 RECID=1 STAMP=863433432
 
RMAN> --4. 然后就可以顺利set newname后switch了。
 
RMAN> run{
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
3> switch datafile 6;
4> }
 
executing command: SET NEWNAME
 
datafile 6 switched to datafile copy
input datafile copy RECID=1 STAMP=863433432 file name=/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222
 
RMAN>
 
RMAN>

时间: 2024-08-07 02:40:02

oracle rman set newname时报错RMAN-06015的相关文章

spark计算hdfs上的文件时报错

问题描述 spark计算hdfs上的文件时报错 scala> val rdd = sc.textFile("hdfs://...") scala> rdd.count java.lang.VerifyError: class org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$AppendRequestProto overrides final method getUnknownFields.

[20160720]rman set newname for datafile

[20160720]rman set newname for datafile本质.txt --前几天在恢复历史数据库,因为生产系统数据库是asm,恢复必须要转成文件类型. --一般脚本执行如下: run { allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; set until time '2015-03-01 18:00:00'; set newname fo

oracle11g-安装Oracle 11g时报错

问题描述 安装Oracle 11g时报错 安装Oracle 11g时报错: ORA-48108: invalid value given for the diagnostic-dest init.ora parameter. ORA-48165: user missing read, write , or exec permission on specified ADR Base directory ORA-48188: user missing read, write , or exec pe

mybatis 批量插入Oracle时,当插入clob类型时报错

问题描述 mybatis 批量插入Oracle时,当插入clob类型时报错 mybatis 批量插入时,当插入clob类型时报错,ORA-01461:仅能绑定要插入LONG列的LONG值.请问怎么解决. po中是字段suo是String类型. 解决方案

新手:oracle数据库导出时报错,用的是toad for oracle软件导出整个数据库

问题描述 新手:oracle数据库导出时报错,用的是toad for oracle软件导出整个数据库 Export: Release 10.2.0.1.0 - Production on 星期一 17 3月 2014 14:01:39 Copyright (c) 2003 2005 Oracle. All rights reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith

oracle-创建工具类连接Oracle数据库时报错

问题描述 创建工具类连接Oracle数据库时报错 属性文件:db.properties jdbc.driver = oracle.jdbc.OracleDriver jdbc.url = jdbc:oracle:thin:@localhost:1521:orcl jdbc.user = c##saturn jdbc.password = saturn 连接数据库的工具类:DBUtility.java import java.io.IOException; import java.sql.*; i

RMAN 系列(五) ---- RMAN 还原 与 恢复

原文转自:http://blog.csdn.net/tianlesoftware/article/details/5700474 一. RMAN 还原与恢复基础 在RMAN 用于中,还原与恢复是两个不同的概念.  还原(restore):指访问先前生成的备份,从中得到一个或多个对象,然后在磁盘上的某个位置还原这些对象.  恢复(recover):是一个数据库与给定时间点相一致以保证能够打开这个数据库的实际进程,该进程通常是通过应用重做(包括联机重做日志和归档的重做日志)来完成的. 数据库中的数据

RMAN 系列(四) ---- RMAN 备份(引用)

原文转自:http://blog.csdn.net/tianlesoftware/article/details/5687938 一. RMAN 备份的一些优点 1. RMAN 会检测和报告损坏的数据块. 2. 不需要将表空间置入热备份模式,RMAN 就可以连接备份数据库. 热备份期间会额外的生成重做日志. 3. RMAN 会自动跟踪新的数据文件和表空间,这样就不再需要在脚本中添加新的表空间和数据文件. 4. RMAN 只备份使用过的数据库(直至最高使用标记(High wate mark)),这

oracle-搜索功能遇到单引号时报错,怎么在sql语句中转译

问题描述 搜索功能遇到单引号时报错,怎么在sql语句中转译 String list_sql = "select rownum p_index,(select count(*) from tb_user) total,p.user_id,p.user_name,p.user_pwd,p.real_name,p.address," +"p.user_tel,p.isloginm,p.refresh_time,p.role_id,p.login_time,p.note,p.user