In the present article i am going to explain how to use RMAN to duplicate database from server A to server B.
I am following the reference note : 388431.1 to perform this activity. The only difference from the reference note id 388431.1 in the present article is that the backups are available on TAPE. The procedure defined in the reference note id is slightly deviated to explain the RMAN duplication precedure if the database backups are on TAPE.
Assumptions Made:
Source Database : SOURCEDB
Target Database : TARGETDB
RMAN Catalog SID : RMANCAT
TAPE Configuration : TIVOLI TAPE
STEPS:
Please follow the article how to perform the database tape backups.
2. Calculate the source and target SPACE requirements
Execute the script on SOURCEDB and calculate the SIZE of database.
If you need the database size with all tablespace sizes, please check the script here.
On the target database node(HOST B), verify the disk space using linux command "df -h"
Compare the results of SOURCEDB size and disk space on target node ( HOST B) and ensure you have enough diskspace for your duplicate database.
3. Making the TAPE backups of SOURCEDB available to TARGETDB
Copy the tdpo.opt file from HOST A to HOST B. Place this in any temporary location say "/tmp/askm".
Copy the TSM password file from HOST A to HOST B and place it in the same location as "/tmp/askm". Make sure the file has proper read write permissions.
Modify this tdpo.opt file and change the password location on HOST B as in:
NOTE : Execute "tdpoconf showenvironment" on HOST A to know the tdpo.opt and password file locations
4. Creating init.ora and administration directories
Copy the SOURCEDB pfile from HOST A to HOST B and modify the DB_NAME , control_file and Dump file locations as per the directory structure on HOST B. Make sure to create DUMP directories on target host HOST B.
Add following two parameter to init.ora on HOST B to reflect the directory structure modification from SOURCEDB to TARGETDB.
( Please refer to note ID : 388431.1, for more details how to prepare init.ora file on target host B)
5. Verifying the connections from TARGETDB node
Verify the sql*net connection to SOURCEDB from HOST B.
Modify the tnsnames.ora file on HOST B and add tns entries for SOURCEDB. And execute "tnsping SOURCEDB" on HOST B. It should successfully resolve the connection.
Create password file for remote database connections on HOST A using following command...
Verify the rman connections using
6. Executing the RMAN duplication script.
Connect to rman and execute the RMAN duplicate script on HOST B.
NOTE : Make sure the TARGETDB is in nomount stage and SOURCEDB is up and running.
Follow the video demo for the visual presenation of the above procedure. This is a private video so, send me a personal request if you need access to this video.
HOPE IT HELPS
SRI
I am following the reference note : 388431.1 to perform this activity. The only difference from the reference note id 388431.1 in the present article is that the backups are available on TAPE. The procedure defined in the reference note id is slightly deviated to explain the RMAN duplication precedure if the database backups are on TAPE.
Assumptions Made:
Source Database : SOURCEDB
Target Database : TARGETDB
RMAN Catalog SID : RMANCAT
TAPE Configuration : TIVOLI TAPE
STEPS:
- Backup the source database SOURCEDB
- Calculate the source and target SPACE requirements
- Making the TAPE backups of SOURCEDB available to TARGETDB
- Creating init.ora and administration directories
- Verifying the connections from TARGETDB node
- Executing the RMAN duplication scripts.
Please follow the article how to perform the database tape backups.
2. Calculate the source and target SPACE requirements
Execute the script on SOURCEDB and calculate the SIZE of database.
SQL> select DF.TOTAL/1048576 "DataFile Size Mb",
LOG.TOTAL/1048576 "Redo Log Size Mb",
CONTROL.TOTAL/1048576 "Control File Size Mb",
(DF.TOTAL + LOG.TOTAL + CONTROL.TOTAL)/1048576 "Total Size Mb"
from dual,
(select sum(a.bytes) TOTAL from dba_data_files a) DF,
(select sum(b.bytes) TOTAL from v$log b) LOG,
(select sum((cffsz+1)*cfbsz) TOTAL from x$kcccf c) CONTROL;
If you need the database size with all tablespace sizes, please check the script here.
On the target database node(HOST B), verify the disk space using linux command "df -h"
Compare the results of SOURCEDB size and disk space on target node ( HOST B) and ensure you have enough diskspace for your duplicate database.
3. Making the TAPE backups of SOURCEDB available to TARGETDB
Copy the tdpo.opt file from HOST A to HOST B. Place this in any temporary location say "/tmp/askm".
Copy the TSM password file from HOST A to HOST B and place it in the same location as "/tmp/askm". Make sure the file has proper read write permissions.
Modify this tdpo.opt file and change the password location on HOST B as in:
TDPO_PSWDPATH /tmp/askm
NOTE : Execute "tdpoconf showenvironment" on HOST A to know the tdpo.opt and password file locations
4. Creating init.ora and administration directories
Copy the SOURCEDB pfile from HOST A to HOST B and modify the DB_NAME , control_file and Dump file locations as per the directory structure on HOST B. Make sure to create DUMP directories on target host HOST B.
Add following two parameter to init.ora on HOST B to reflect the directory structure modification from SOURCEDB to TARGETDB.
db_file_name_convert =("/u01/app/oradata/SOURCEDB/", "/u01/app/oradata/TARGETDB/")Modify the undo_tablespace value to be same as the SOURCEDB undo_tablespace value.
log_file_name_convert =("/u01/app/oradata/SOURCEDB/", "/u01/app/oradata/TARGETDB/")
( Please refer to note ID : 388431.1, for more details how to prepare init.ora file on target host B)
5. Verifying the connections from TARGETDB node
Verify the sql*net connection to SOURCEDB from HOST B.
$ sqlplus 'sys/oracle@SOURCEDB as sysdba'If it is not working , please perform the following tasks ..
Modify the tnsnames.ora file on HOST B and add tns entries for SOURCEDB. And execute "tnsping SOURCEDB" on HOST B. It should successfully resolve the connection.
Create password file for remote database connections on HOST A using following command...
orapwd file=orapwSOURCEDB password=oracle entries=5Now check the sqlplus connection to SOURCEDB again from HOST B.
Verify the rman connections using
sqlplus rman/rman@rmancat
6. Executing the RMAN duplication script.
Connect to rman and execute the RMAN duplicate script on HOST B.
NOTE : Make sure the TARGETDB is in nomount stage and SOURCEDB is up and running.
$ export ORACLE_SID=TARGETDB
$ rman target sys/oracle@SOURCEDB catalog rman/rman@rmancat auxiliary /
RMAN> run {
# Recovery Time
#set until time 'MON DD YYYY HH:MI:SS';
# Allocate Channels to Tape
configure auxiliary channel 1 device type sbt parms="ENV=(TDPO_OPTFILE=/tmp/askm/tdpo.opt)";
# Issue the duplicate command
DUPLICATE TARGET DATABASE TO TARGETDB
# Create online redo log groups
LOGFILE
GROUP 1 (
'/u01/app/oradata/TARGETDB/redolog1a.log',
'/u01/app/oradata/TARGETDB/redolog1b.log'
) SIZE 50M,
GROUP 2 (
'/u01/app/oradata/TARGETDB/redolog2a.log',
'/u01/app/oradata/TARGETDB/redolog2b.log'
) SIZE 50M,
GROUP 3 (
'/u01/app/oradata/TARGETDB/redolog3a.log',
'/u01/app/oradata/TARGETDB/redolog3b.log'
) SIZE 50M,
GROUP 4 (
'/u01/app/oradata/TARGETDB/redolog4a.log',
'/u01/app/oradata/TARGETDB/redolog4b.log'
) SIZE 50M;
}
Follow the video demo for the visual presenation of the above procedure. This is a private video so, send me a personal request if you need access to this video.
HOPE IT HELPS
SRI
+ comments + 30 comments
what editor are u using ? the commands look beautifully formatted, can i have the editor name u are using.
Please go through the following link. You will be able to use the same format. There are many option instead to use. Its your choice now .. :-)
http://en.support.wordpress.com/code/posting-source-code/
Please send me contact detail , so i can personally contact you to access above private video
Hi Singh,
You are given access to these videos. You will have this access for next three days. Thanks for your interest in this.
Thanks
SRI
Hi SRI,
Can i please have access to this video as i am trying to do the same thing which you are explaining but failing miserably.
Thanks
Kamal
Please provide access to this video since i have the same issue of restoring using TSM and duplicating the database.
Hi Ahmed,
You are given access to these videos. You will have this access for next three days. Thanks for your interest to this article.
Thanks
SRI
Thanks SRI for the access but for some reason i was unable to view the videos on youtube.
Please advise.
Can you please give me access to the video.
you are given access to this video now.
Thank you!!!!
I still can't see the videos!?
Please can you give me access to the video. My mail is suadhm@gmail.com
Thank you.
Hi Sri
Could you please give me the access of these videos as well.
Thanks in Advance.
Samz
Hi Sri,
Can i have access to the video again as i was unable to check it the last time.
Thanks for the help in advance.
Kamal
Hi Sri,
The document is really nice and helpful to understand the db clone with DUPLICATE command ...
Can i have access to the video...
Thanks for the help in advance.
Thanks!
sumer
Hi Sri
Could you please give me the access of these videos as well.
Thanks in Advance.
Samz
Can you please provide me access for the above videos.
Thanks
Sarat
Hi Sarat, You are given access to these videos.
Can you please provide me access for the above videos.
Sanjay
I would like if you add the details for the dsm.sys file which contain the info of all tsm server , if the target and aux database are different TSM server.
Can I have access to the video
Hi Sri,
Thanks for the share. Could you please give access to this vedio?
-Sreeraj
Hi Sree Raj, You are given access to the video. Thanks SRI
Hi can i have acces on this vedio i need it please
Hi Ahmed, Please provide me gmail id to add you to the list.
Can I have access to the video please
hi
Shri
above is the great explanation
can you please share video for the same with me
Please give me access to these Videos...Thanks in Advance
THanks a lot . Is it possible to get access to the videio
Post a Comment
Thank you for visiting our site and leaving your valuable comment.