Total Pageviews

Saturday 10 September 2016

RMAN duplicate database having multiple directories to assign to BACKUP LOCATION


By default RMAN picks one backup location to do duplicate with clause 'BACKUP LOCATION' .
Many times user don't have much space in single location ,hence, the backup piece distributed 
to different location and at same time want to use 'BACKUP LOCATION' feature for duplicate.

How to perform the RMAN duplication using the BACKUP LOCATION clause when the RMAN backuppieces are stored on several mount points or directories?

1/ Create the softlink on all of the individual RMAN backuppieces required for the RMAN duplicate, as shown in the example here. You may change the '/tmp/rmanbkup' on a different directory where you want to create those softlinks.

mkdir /tmp/rmanbkup

ln -s /o/zfssa/backup01/scs/84oqpfif_1_1 /tmp/rmanbkup/84oqpfif_1_1
ln -s /o/zfssa/backup02/scs/87oqpfif_1_1 /tmp/rmanbkup/87oqpfif_1_1


-- You can run the following SQL statements to dynamically generate the Unix command "ln -s" for the 
-- individual RMAN backuppieces required for the RMAN duplicate, as shown here. 
-- In the following SQL statement, just modify the start date and end date that corresponds to when 
-- the backup started and backup completed.


set linesize 200 pagesize 0 verify off echo off feedback off
select 'ln -s ' || handle || ' /tmp/rmanbkup' || substr(handle, instr( handle, '/', -1 ))
  from v$backup_piece
 where completion_time between to_date ('05-DEC-2013 20:00:00','DD-MON-RRRR HH24:MI:SS') 
   and to_date('05-DEC-2013 22:00:00','DD-MON-RRRR HH24:MI:SS')
   and device_type = 'DISK'
 order by handle;


2/ In the RMAN duplicate, the BACKUP LOCATION is '/tmp/rmanbkup', as shown here.

DUPLICATE DATABASE TO gvlt03
SPFILE
SET CONTROL_FILES='+DATA_GXPB'
SET DB_FILE_NAME_CONVERT='+DATA_GXTB','+DATA_GXPB','RECO_GXTB','RECO_GXPB','DBFS_DG','DBFS_DG'
SET LOG_FILE_NAME_CONVERT='+DATA_GXTB','+DATA_GXPB','RECO_GXTB','RECO_GXPB','DBFS_DG','DBFS_DG'
SET DB_CREATE_ONLINE_LOG_DEST_1='+DATA_GXPB'
SET DB_CREATE_ONLINE_LOG_DEST_2='+DATA_GXPB' 
SET DB_RECOVERY_FILE_DEST='+RECO_GXPB'
SET instance_number='1'
SET DIAGNOSTIC_DEST='/u01/app/oowner'
set audit_file_dest='/u01/app/oowner/admin/gvlt03/adump'
BACKUP LOCATION '/tmp/rmanbkup'
NOFILENAMECHECK;


1 comment:

  1. Jadwal Pertandingan Ayam SV388 7 Maret 2019 - Jumat, Lombok 8 Maret 2019 – Pada Hari Tersebut Akan Di Laksanakan Berbagai Pertandingan Sabung Ayam Secara Live di Arena Sabung Ayam Thailand.

    Situs Judi Sabung Ayam Online SV388 Merupakan Situs Judi Asal Thailand Yang Sangat Terkenal Dengan Permainan Sabung Ayam Yang Fair dan Menghibur Para Penonton Judi Sabung Ayam.

    Untuk Info Lebih Lanjut Bisa Hub kami Di :
    wechat : bolavita
    line : cs_bolavita
    whatsapp : +628122222995
    BBM: BOLAVITA

    ReplyDelete