Oracle : Restore command for HRDBUG
Run PT_CONFIG_TABLE_EXP.DMS to capture tools tables from target environment - hrdbug
From HRPROD:
>rman target / catalog hrprod19/bkup_123@rmprod auxiliary sys/Ysw8PTgJ@hrdbug OLD. DELETE THIS LINE
>rman target / catalog hrprod19/bkup_123@rmprod auxiliary sys/cZQwV3EqQy9K_M@hrdbug
RMAN> spool log to /usr/local/oracle/restoreHrdbugSeptember14th.txt;
RMAN> run {
startup clone nomount;
allocate auxiliary channel aux1 device type disk;
set until scn 127431400813;
DUPLICATE target database to hrdbug
nofilenamecheck
db_file_name_convert = (
'hrprod','hrdbug'
);
}
spool log off
When you need to specify which file system:
db_file_name_convert = ('/usr/opt/app/oracle/admin/hrprod/data01', '/usr/opt/app/oracle/admin/hrdbug/data01'
'/usr/opt/app/oracle/admin/hrprod/data02','/usr/opt/app/oracle/admin/hrdbug/data02'
'/usr/opt/app/oracle/admin/hrprod/ndx02','/usr/opt/app/oracle/admin/hrdbug/ndx02'
'/usr/opt/app/oracle/admin/hrprod/ndx01', '/usr/opt/app/oracle/admin/hrdbug/ndx01'
'/usr/opt/app/oracle/admin/hrprod/flash01', '/usr/opt/app/oracle/admin/hrdbug/flash01'
'/usr/opt/app/oracle/admin/hrprod/redo01', '/usr/opt/app/oracle/admin/hrdbug/redo01'
'/usr/opt/app/oracle/admin/hrprod/redo02', '/usr/opt/app/oracle/admin/hrdbug/redo02'
'/usr/opt/app/oracle/admin/hrprod/system01', '/usr/opt/app/oracle/admin/hrdbug/system01'
'/usr/opt/app/oracle/admin/hrprod/temp01', '/usr/opt/app/oracle/admin/hrdbug/temp01'
'/usr/opt/app/oracle/admin/hrprod/undo01', '/usr/opt/app/oracle/admin/hrdbug/undo01'
'/usr/opt/app/oracle/admin/hrprod/arch', '/usr/opt/app/oracle/admin/hrdbug/arch');
}
spool log off;
It is preferred that you use 'set until . . . ' else rman will look for most recent archive logs if you don't use that clause,
and you can get these errors while restoring: RMAN-06053 and RMAN-06025
oracle-pshrdb602.tmw.com:hrprod:/usr/opt/app/oracle/orahome>rman target / catalog hrprod19/bkup_123@rmprod
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 14 09:55:50 2026
Version 19.32.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: HRPROD (DBID=3518093084)
connected to recovery catalog database
RMAN> list backup of controlfile completed before '15-SEP-2026';
list backup of controlfile completed before '15-SEP-2026';
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2001258 Full 26.86M DISK 00:00:00 14-SEP-26
BP Key: 2001260 Status: AVAILABLE Compressed: NO Tag: TAG20260914T021557
Piece Name: /usr/opt/app/dbdump/hot_backup/HRPROD/HRPROD_AutoCTL_c-3518093084-20260914-00.bak
Control File Included: Ckp SCN: 127431400813 Ckp time: 14-SEP-26
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2001313 Full 26.86M DISK 00:00:00 14-SEP-26
BP Key: 2001317 Status: AVAILABLE Compressed: NO Tag: TAG20260914T094204
Piece Name: /usr/opt/app/dbdump/hot_backup/HRPROD/HRPROD_AutoCTL_c-3518093084-20260914-01.bak
Control File Included: Ckp SCN: 127432333169 Ckp time: 14-SEP-26
RMAN>
Comments
Post a Comment