我使用RMAN从一个数据库克隆到另一个数据库。克隆成功,但是问题在于临时文件和临时文件的位置没有根据新数据库更改。撤消数据文件也会发生同样的问题。解决方案是什么? 以下是我分别用于“备份”和“克隆”的行:
备份:
connect target /;
shutdown immediate;
startup mount;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
configure device type disk parallelism 5;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE channel 1 DEVICE TYPE DISK FORMAT '/eb20/RMAN/EB20AUX_14072020/bkpset_%U';
CONFIGURE channel 2 DEVICE TYPE DISK FORMAT '/eb20/RMAN/EB20AUX_14072020/bkpset_%U';
CONFIGURE channel 3 DEVICE TYPE DISK FORMAT '/eb20/RMAN/EB20AUX_14072020/bkpset_%U';
CONFIGURE channel 4 DEVICE TYPE DISK FORMAT '/eb20/RMAN/EB20AUX_14072020/bkpset_%U';
CONFIGURE channel 5 DEVICE TYPE DISK FORMAT '/eb20/RMAN/EB20AUX_14072020/bkpset_%U';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/eb20/RMAN/EB20AUX_14072020/%F';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/eb20/RMAN/EB20AUX_14072020/snapc_EB20AUX_14072020.f';
backup database include current controlfile ;
alter database open;
还原:
connect auxiliary sys/sysmanager@EB20ST
duplicate database to EB20ST
db_file_name_convert='/eb20/EB20AUX/data01','/eb20/EB20ST/data01'
logfile
group 1 ('/eb20/EB20ST/redo01/redo01.rdo','/eb20/EB20ST/redo01/redo02.rdo') SIZE 256M reuse,
group 2 ('/eb20/EB20ST/redo01/redo03.rdo','/eb20/EB20ST/redo01/redo04.rdo') SIZE 256M reuse
backup location '/eb20/RMAN/EB20AUX_<DATE>' nofilenamecheck;
请帮助。
答案 0 :(得分:0)
我看到db_file_name_convert='/eb20/EB20AUX/data01','/eb20/EB20ST/data01'. Are you sure that your tempfiles also located in
/ eb20 / EB20AUX / data01`吗?
如果不是这样,则需要为临时文件添加一对路径:
db_file_name_convert='/eb20/EB20AUX/data01','/eb20/EB20ST/data01','path_to_old_tempfiles_dir','/path_to_new_tempfiles_dir'