Hello Community,
I'm trying to duplicate a PROD database to a test environment using the backup based technique. I test the duplicate script and all works fine when the paths of the "auxiliary" database (the database that I'm trying to create) have the same paths as the "target" database (the production database). If I change the paths, the duplicate failed because it doesn't find one backup of controlfile:
channel ch1: starting datafile backup set restore
channel ch1: restoring control file
channel ch1: reading from backup piece PROD_cf_c-2175092736-20151204-0c
channel ch1: ORA-19870: error while restoring backup piece PROD_cf_c-2175092736-20151204-0c
ORA-19507: failed to retrieve sequential file, handle="PROD_cf_c-2175092736-20151204-0c", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Backup file <PROD_cf_c-2175092736-20151204-0c> not found in NetBackup catalog
This is the script that works but if I have the same directories structure in PROD and TEST (but this is not a real scenario):
run
{
allocate auxiliary channel ch1 device type sbt;
send 'NB_ORA_CLIENT=xxx,NB_ORA_POLICY=xxx,NB_ORA_SCHED=Full_Diario';
duplicate database PROD to TEST
until time "sysdate-2/24"
NOFILENAMECHECK;
release channel ch1;
}
And this is the script that it doesn't work because I have different directory structure in PROD and TEST
run
{
allocate auxiliary channel ch1 device type sbt;
send 'NB_ORA_CLIENT=xxx,NB_ORA_POLICY=xxx,NB_ORA_SCHED=Full_Diario';
duplicate database PROD to TEST
until time "sysdate-2/24"
spfile
set control_files '/TEST/orabd1/ctl/control_PROD_01.ctl','/TEST/oralog1/ctl/control_PROD_02.ctl','/TEST/oralog2/ctl/control_PROD_03.ctl'
set db_file_name_convert '/PROD/','/TEST/'
set log_file_name_convert '/PROD/','/TEST/'
set core_dump_dest '/TEST/oralog1/cdump'
set db_name 'TEST'
set diagnostic_dest '/TEST/oralog2'
set instance_name 'TEST'
set local_listener 'LISTENER_TEST'
set log_archive_dest_1 'LOCATION=/TEST/arch'
set log_archive_dest_2 'LOCATION=NULL'
;
release channel ch1;
}
I've tried to restore a file from Netbackup and it works. I try to duplicate a database when the directory structures are identical and it works. Why is it failing when I change the destination paths?
Thanks!
Marina.