|
-
Could someone review my RMAN Duplicate Command Syntax?
I've been tasked with re-creating a test instance using the RMAN duplicate command, and I plan to try this out on Monday.
I'm using Oracle 9iR2 and Solaris v9.2.0.7.0. I'm a neophyte DBA with little actual Oracle experience at this point. However, I've taken the Backup and Recovery course. I've also read the Recovery Manager Quick Reference - a96564.pdf, Backup and Recovery Concepts - a96519.pdf, and I'm in the process of reading the Recovery Manager Users Guide - a96566.pdf.
Would you guys mind reviewing the script below and let me know: (1) if the syntax looks OK; (2) if there's anything that I'm forgetting.
Thanks. I really appreciate your help.
#
# Author:
# Script: rest_226_from_t.sh
# Date: August 17, 2007
#
# Purpose: Use this script to restore the TEST226 database from what has been backed up
# for MACTIVET using the last RMAN backup. Note: (1) Auxillary instance, TEST226,
# must be started with the NOMOUNT option; (2) Either Move disk copies and backups
# from the target host to the duplicate host and re-catalog them OR
# make sure that all backups and copies on the target host are remotely accessible
# from the duplicate host.
#
# Commands to specify group1 and group2 for the logfiles have been removed as the
# syntax below should do the following - If neither logfile nor LOG_FILE_NAME_CONVERT is specified,
# RMAN uses the original target redo log filenames for the duplicate files. You must
# use the nofilenamecheck option in this case. This according to information found at
# http://download-west.oracle.com/docs...sy24.htm#49769
#
# syntax for set newname command found in PDF version of Recovery Manager Reference on
# page 139 or 292 in PDF (RMAN Commands 2-113)
#
# TEMP file location / name changed to use correct one in MACTIVET.
su - oracle
cd /u01/app/oracle/admin/MPRTEST/scripts/RMAN
rman target / catalog radmin/change_on_install@rcat
'connect catalog radmin/radmin@rcat;
connect auxiliary sys/change_on_install@TEST226;
run {
allocate auxiliary channel test1 type 'disk';
allocate auxiliary channel test2 type 'disk';
allocate auxiliary channel test3 type 'disk';
allocate auxiliary channel test4 type 'disk';
set newname for system01 1 TO '/u02/oradata/TEST226/system01.dbf';
set newname for undotbs01 2 TO '/u03/oradata/TEST226/undotbs01.dbf';
set newname for ADBASE_01 3 TO '/u04/oradata/TEST226/ADBASE_01.dbf';
set newname for ADBASE_BI_01 4 TO '/u07/oradata/TEST226/ADBASE_BI_01.dbf';
set newname for ADBASE_BI_IDX_01 5 TO '/u05/oradata/TEST226/ADBASE_BI_IDX_01.dbf';
set newname for CWMLITE_01 6 TO '/u04/oradata/TEST226/CWMLITE_01.dbf';
set newname for indx01 7 TO '/u05/oradata/TEST226/indx01.dbf';
set newname for ODM_01 8 TO '/u07/oradata/TEST226/ODM_01.dbf';
set newname for PGL_01 9 TO '/u04/oradata/TEST226/PGL_01.dbf';
set newname for tools01 10 TO '/u07/oradata/TEST226/tools01.dbf';
set newname for users01 11 TO '/u04/oradata/TEST226/users_01.dbf';
set newname for ADBASE_BLOB_01 12 TO '/u07/oradata/TEST226/ADBASE_BLOB_01.dbf';
set newname for TEMP01.dbf 13 TO '/u06/oradata/TEST226/temp01.dbf';
duplicate target database to TEST226 nofilenamecheck;
}
Last edited by mpoisson; 08-28-2007 at 01:23 PM.
"There is no pleasure in having nothing to do; the fun is having lots to do and not doing it." Andrew Jackson
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|