DUPLICATE数据库到不同的机器时要将备份文件放于相同目录。
2009-03-03 10:00
423 查看
由于备份文件信息记录到控制文件当中,所以远程的备份文件应该放在与源机器相同的目录结构中或是建立符号链接来保证这一点,否则会报如下错误:
$ rman target sys/change_on_install@cpprd.sevenspace.net auxiliary sys/change_on_install@cptst.sevenspace.net
Recovery Manager: Release 9.2.0.7.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: CPPRD (DBID=777430827)
connected to auxiliary database: CPTST (not mounted)
RMAN> DUPLICATE TARGET DATABASE TO CPTST until time "to_date('03/02/2009 00:39','mm/dd/yyyy hh24:mi')" nofilenamecheck;
Starting Duplicate Db at 02-MAR-09
using target database controlfile instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=13 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=14 devtype=DISK
printing stored script: Memory Script
{
set until scn 8375200949668;
set newname for datafile 1 to
"/global/oracle2/oradata2/CPTST/system01.dbf";
set newname for datafile 2 to
"/global/oracle2/oradata2/CPTST/undotbs01.dbf";
set newname for datafile 3 to
"/global/oracle2/oradata2/CPTST/drsys01.dbf";
set newname for datafile 4 to
"/global/oracle2/oradata2/CPTST/tools01.dbf";
set newname for datafile 5 to
"/global/oracle2/oradata2/CPTST/users01.dbf";
set newname for datafile 6 to
"/global/oracle2/oradata2/CPTST/xdb01.dbf";
set newname for datafile 7 to
"/global/oracle2/oradata2/CPTST/am_data01.dbf";
set newname for datafile 8 to
"/global/oracle2/oradata2/CPTST/cta_data01.dbf";
set newname for datafile 9 to
"/global/oracle2/oradata2/CPTST/heartbeat_data01.dbf";
set newname for datafile 10 to
"/global/oracle2/oradata2/CPTST/cp_inventory_data01.dbf";
set newname for datafile 11 to
"/global/oracle2/oradata2/CPTST/jira_data01.dbf";
set newname for datafile 12 to
"/global/oracle2/oradata2/CPTST/mast_data01.dbf";
set newname for datafile 13 to
"/global/oracle2/oradata2/CPTST/pm_data01.dbf";
set newname for datafile 14 to
"/global/oracle2/oradata2/CPTST/services_data01.dbf";
set newname for datafile 15 to
"/global/oracle2/oradata2/CPTST/spyglass_data01.dbf";
set newname for datafile 16 to
"/global/oracle2/oradata2/CPTST/webadmin_data01.dbf";
set newname for datafile 17 to
"/global/oracle2/oradata2/CPTST/pwd_data01.dbf";
set newname for datafile 18 to
"/global/oracle2/oradata2/CPTST/account_data01.dbf";
set newname for datafile 19 to
"/global/oracle2/oradata2/CPTST/hr_data01.dbf";
set newname for datafile 20 to
"/global/oracle2/oradata2/CPTST/webadmin_data02.dbf";
set newname for datafile 21 to
"/global/oracle2/oradata2/CPTST/wiki01.dbf";
set newname for datafile 22 to
"/global/oracle2/oradata2/CPTST/smc_mv_logs01.dbf";
restore
check readonly
clone database
;
}
executing script: Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 02-MAR-09
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: starting datafile backupset restore
channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /global/oracle2/oradata2/CPTST/undotbs01.dbf
restoring datafile 00005 to /global/oracle2/oradata2/CPTST/users01.dbf
restoring datafile 00006 to /global/oracle2/oradata2/CPTST/xdb01.dbf
restoring datafile 00007 to /global/oracle2/oradata2/CPTST/am_data01.dbf
restoring datafile 00008 to /global/oracle2/oradata2/CPTST/cta_data01.dbf
restoring datafile 00009 to /global/oracle2/oradata2/CPTST/heartbeat_data01.dbf
restoring datafile 00013 to /global/oracle2/oradata2/CPTST/pm_data01.dbf
restoring datafile 00015 to /global/oracle2/oradata2/CPTST/spyglass_data01.dbf
restoring datafile 00018 to /global/oracle2/oradata2/CPTST/account_data01.dbf
restoring datafile 00021 to /global/oracle2/oradata2/CPTST/wiki01.dbf
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /global/oracle2/oradata2/CPTST/system01.dbf
restoring datafile 00003 to /global/oracle2/oradata2/CPTST/drsys01.dbf
restoring datafile 00004 to /global/oracle2/oradata2/CPTST/tools01.dbf
restoring datafile 00010 to /global/oracle2/oradata2/CPTST/cp_inventory_data01.dbf
restoring datafile 00011 to /global/oracle2/oradata2/CPTST/jira_data01.dbf
restoring datafile 00012 to /global/oracle2/oradata2/CPTST/mast_data01.dbf
restoring datafile 00014 to /global/oracle2/oradata2/CPTST/services_data01.dbf
restoring datafile 00017 to /global/oracle2/oradata2/CPTST/pwd_data01.dbf
restoring datafile 00019 to /global/oracle2/oradata2/CPTST/hr_data01.dbf
restoring datafile 00022 to /global/oracle2/oradata2/CPTST/smc_mv_logs01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/02/2009 20:50:03
RMAN-03015: error occurred in stored script Memory Script
ORA-19505: failed to identify file "/global/oracle4/ORADUMP/CPPRD/backup/CPPRD_rman_db_t5k8s60a_1_1.bak"
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
解决办法:
ln -s /global/oracle2/oradump2/CPTST/backup /global/oracle4/ORADUMP/CPPRD/backup/
问题解决!
$ rman target sys/change_on_install@cpprd.sevenspace.net auxiliary sys/change_on_install@cptst.sevenspace.net
Recovery Manager: Release 9.2.0.7.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: CPPRD (DBID=777430827)
connected to auxiliary database: CPTST (not mounted)
RMAN> DUPLICATE TARGET DATABASE TO CPTST until time "to_date('03/02/2009 00:39','mm/dd/yyyy hh24:mi')" nofilenamecheck;
Starting Duplicate Db at 02-MAR-09
using target database controlfile instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=13 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=14 devtype=DISK
printing stored script: Memory Script
{
set until scn 8375200949668;
set newname for datafile 1 to
"/global/oracle2/oradata2/CPTST/system01.dbf";
set newname for datafile 2 to
"/global/oracle2/oradata2/CPTST/undotbs01.dbf";
set newname for datafile 3 to
"/global/oracle2/oradata2/CPTST/drsys01.dbf";
set newname for datafile 4 to
"/global/oracle2/oradata2/CPTST/tools01.dbf";
set newname for datafile 5 to
"/global/oracle2/oradata2/CPTST/users01.dbf";
set newname for datafile 6 to
"/global/oracle2/oradata2/CPTST/xdb01.dbf";
set newname for datafile 7 to
"/global/oracle2/oradata2/CPTST/am_data01.dbf";
set newname for datafile 8 to
"/global/oracle2/oradata2/CPTST/cta_data01.dbf";
set newname for datafile 9 to
"/global/oracle2/oradata2/CPTST/heartbeat_data01.dbf";
set newname for datafile 10 to
"/global/oracle2/oradata2/CPTST/cp_inventory_data01.dbf";
set newname for datafile 11 to
"/global/oracle2/oradata2/CPTST/jira_data01.dbf";
set newname for datafile 12 to
"/global/oracle2/oradata2/CPTST/mast_data01.dbf";
set newname for datafile 13 to
"/global/oracle2/oradata2/CPTST/pm_data01.dbf";
set newname for datafile 14 to
"/global/oracle2/oradata2/CPTST/services_data01.dbf";
set newname for datafile 15 to
"/global/oracle2/oradata2/CPTST/spyglass_data01.dbf";
set newname for datafile 16 to
"/global/oracle2/oradata2/CPTST/webadmin_data01.dbf";
set newname for datafile 17 to
"/global/oracle2/oradata2/CPTST/pwd_data01.dbf";
set newname for datafile 18 to
"/global/oracle2/oradata2/CPTST/account_data01.dbf";
set newname for datafile 19 to
"/global/oracle2/oradata2/CPTST/hr_data01.dbf";
set newname for datafile 20 to
"/global/oracle2/oradata2/CPTST/webadmin_data02.dbf";
set newname for datafile 21 to
"/global/oracle2/oradata2/CPTST/wiki01.dbf";
set newname for datafile 22 to
"/global/oracle2/oradata2/CPTST/smc_mv_logs01.dbf";
restore
check readonly
clone database
;
}
executing script: Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 02-MAR-09
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: starting datafile backupset restore
channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /global/oracle2/oradata2/CPTST/undotbs01.dbf
restoring datafile 00005 to /global/oracle2/oradata2/CPTST/users01.dbf
restoring datafile 00006 to /global/oracle2/oradata2/CPTST/xdb01.dbf
restoring datafile 00007 to /global/oracle2/oradata2/CPTST/am_data01.dbf
restoring datafile 00008 to /global/oracle2/oradata2/CPTST/cta_data01.dbf
restoring datafile 00009 to /global/oracle2/oradata2/CPTST/heartbeat_data01.dbf
restoring datafile 00013 to /global/oracle2/oradata2/CPTST/pm_data01.dbf
restoring datafile 00015 to /global/oracle2/oradata2/CPTST/spyglass_data01.dbf
restoring datafile 00018 to /global/oracle2/oradata2/CPTST/account_data01.dbf
restoring datafile 00021 to /global/oracle2/oradata2/CPTST/wiki01.dbf
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /global/oracle2/oradata2/CPTST/system01.dbf
restoring datafile 00003 to /global/oracle2/oradata2/CPTST/drsys01.dbf
restoring datafile 00004 to /global/oracle2/oradata2/CPTST/tools01.dbf
restoring datafile 00010 to /global/oracle2/oradata2/CPTST/cp_inventory_data01.dbf
restoring datafile 00011 to /global/oracle2/oradata2/CPTST/jira_data01.dbf
restoring datafile 00012 to /global/oracle2/oradata2/CPTST/mast_data01.dbf
restoring datafile 00014 to /global/oracle2/oradata2/CPTST/services_data01.dbf
restoring datafile 00017 to /global/oracle2/oradata2/CPTST/pwd_data01.dbf
restoring datafile 00019 to /global/oracle2/oradata2/CPTST/hr_data01.dbf
restoring datafile 00022 to /global/oracle2/oradata2/CPTST/smc_mv_logs01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/02/2009 20:50:03
RMAN-03015: error occurred in stored script Memory Script
ORA-19505: failed to identify file "/global/oracle4/ORADUMP/CPPRD/backup/CPPRD_rman_db_t5k8s60a_1_1.bak"
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
解决办法:
ln -s /global/oracle2/oradump2/CPTST/backup /global/oracle4/ORADUMP/CPPRD/backup/
问题解决!
相关文章推荐
- mssql server 2005还原数据库bak文件与“备份集中的数据库备份与现有的xx数据库不同”解决方法
- rman 相同备份到不同目录下面
- 合并不同目录下,相同文件的内容(java实现)
- 获取数据库机器的文件目录
- Oracle数据库案例整理-恢复数据库失败-主备机控制文件所在目录不同
- (精)如何利用T_SQL实现数据库备份与还原处理之一--(如何利用sql语句,得到数据库文件目录)
- MySql直接备份数据库文件的方法(MyISAM和InnoDB有所不同)
- 利用XtraBackup做全量备份、增量备份、数据目录相同恢复、数据目录不同恢复、单表备份恢复
- asp.net当文件在不同目录下,需要获取数据库连接字符串收藏
- MSSQL2005 还原bak文件时数据库备份与现有的数据库不同解决方法
- 切忌忽视数据库文件备份以及使用恰当的保存目录
- 悬而未决:取得二个相同目录下不同修改日期的所有文件及全不覆盖复制
- MS SQL 数据库文件如何在不同磁盘目录内迁移
- 还原某一个目录下的所有数据库备份文件
- linux下面根据不同的日期创建不同文件,一般用户数据库的备份的shell编程
- 还原某一个目录下的所有数据库备份文件
- asp.net当文件在不同目录下,需要获取数据库连接字符串
- 还原某一个目录下的所有数据库备份文件
- 搜索系统不同目录下相同名称的文件个数和具体路径
- shell 备份本地文件目录到远程机器