RMAN duplicate库报错
dbdao吧
全部回复
仅看楼主
level 2
bisal 楼主
第一次尝试duplicate库,但是报错了,还请您指导,谢谢。
需求:两个单实例11.2.0.4数据库,相关目录结构完全一致,库1是完整的数据库,库2只创建了软件,没有创建数据库。需要从库2执行duplicate复制库1。
库1:是target库
库2:是auxiliary库
执行步骤:
库1:
1. 设置归档模式。
2. create pfile from spfile;,文件名是inittest.ora
3. 导出control文件,alter database backup controlfile to '/home/oracle/backup/control.ctl';
库2:
1. copy库1的pfile放置dbs路径下。
2. startup nomount pfile ='$ORACLE_HOME/dbs/inittest.ora';
3. 配置了listener和tnsnames.ora,可以使用连接库1和库2。
4. 将库1的spfiletest.ora拷贝到库2的dbs路径下。
5. rman target sys/oracle@库1
然后执行connect auxiilary sys/oracle@库2
然后执行duplicate target database to 库2 nofilenamecheck;
然后就报错:
Starting restore at 31-JAN-16
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=133 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
ORA-19625: error identifying file /home/oracle/backup/control.ctl
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-19600: input file is control file (/home/oracle/backup/control.ctl)
ORA-19601: output file is control file (/u01/app/oracle/11.2.0.4/oradata/dep/control01.ctl)
failover to previous backup
channel ORA_AUX_DISK_1: restoring control file
ORA-19625: error identifying file /home/oracle/control.ctl
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-19600: input file is control file (/home/oracle/control.ctl)
ORA-19601: output file is control file (/u01/app/oracle/11.2.0.4/oradata/dep/control01.ctl)
failover to previous backup
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 01/31/2016 20:07:33
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
2016年02月01日 01点02分 1
level 1
auxiliary库相应的目录没建。
2016年02月01日 01点02分 2
具体是/home/oracle/backup么?
2016年02月01日 02点02分
level 2
bisal 楼主
如果我将库1的backup/control.ctl删除,再次执行duplicate,则报错:
Errors in memory script
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 02/02/2016 09:52:04
RMAN-20000: abnormal termination of job step
RMAN-11003: failure during parse/execution of SQL statement: alter system set db_name = 'DEP' comment= 'Reset to original value by RMAN' scope=spfile
RMAN-11001: Oracle Error:
ORA-32001: write to SPFILE requested but no SPFILE is in use
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 02/02/2016 09:52:00
RMAN-20000: abnormal termination of job step
RMAN-11003: failure during parse/execution of SQL statement: alter system set db_name = 'DEP' comment= 'Modified by RMAN duplicate' scope=spfile
RMAN-11001: Oracle Error:
ORA-01565: error in identifying file '/u01/app/oracle/11.2.0.4/dbhome_1/dbs/spfiledep.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 02/02/2016 09:52:04
RMAN-05501: aborting duplication of target database
2016年02月01日 02点02分 3
level 1
pfile启动了,create spfile from pfile
还有auxiliary库相应的目录,adump,归档目录,数据文件目录和源库保持一致。先建好目录~
权限、属主等一致。
2016年02月01日 11点02分 4
谢谢。
2016年02月03日 06点02分
1