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/restoreHrdbugNovember26th.txt;

RMAN> run {

startup clone nomount;

allocate auxiliary channel aux1 device type disk;

set until scn 125993622760;

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 Wed Nov 26 10:35:43 2025

Version 19.28.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 '27-NOV-2025';

list backup of controlfile completed before '27-NOV-2025';


List of Backup Sets

===================



BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

1863266 Full    26.86M     DISK        00:00:00     26-NOV-25

        BP Key: 1863268   Status: AVAILABLE  Compressed: NO  Tag: TAG20251126T024304

        Piece Name: /usr/opt/app/dbdump/hot_backup/HRPROD/HRPROD_AutoCTL_c-3518093084-20251126-00.bak

  Control File Included: Ckp SCN: 125993622760   Ckp time: 26-NOV-25


BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

1863326 Full    26.86M     DISK        00:00:00     26-NOV-25

        BP Key: 1863330   Status: AVAILABLE  Compressed: NO  Tag: TAG20251126T102318

        Piece Name: /usr/opt/app/dbdump/hot_backup/HRPROD/HRPROD_AutoCTL_c-3518093084-20251126-01.bak

  Control File Included: Ckp SCN: 125994798661   Ckp time: 26-NOV-25



RMAN>















Comments

Popular posts from this blog

Postgres: Clean up stopped replication slot