DB Cloning Steps
1.Taking the backup of primary (or) source database
2.Copy(scp) backup pieces of the target database
3.Start an auxiliary instance on the target
4.Create the control file
5.Restore the database from backup
6.Open the database using resetlogs
or using RMAN
1.Taking the backup of primary (or) source database,pfile
>Create pfile from spfile;
Take the RAMN full backup & Controlfile backup
rman
rman>connect target /
rman>backup database plus archivelog;
rman>backup current controlfile;
rman>exit
2.Copy(scp) backup pieces & pfile of the source database
Go to the backup pieces & pfile location and do scp the to target server
edit pfile
replace the old db name with new clonedb name
dbname=change
db_file_name_covert='oldlocation','newlocation'
log_file_name_convert='oldlocation','newlocation'
:wq!
Create the nececcesry directory structures.
edit oratab file as well.
3.Start an auxiliary instance on the target
export THE ENVIRONMENTABLE VARIABLES .
SQLPLUS/ AS SYSDBA
>STARTUP NOMOUNT
>EXIT
tnsping sourcedb_name
rman
RMAN>connect auxiliary /
rman>connect target sys/oracle@sorucedb_name;
rman>run
{
allocate auxilary channel c1 device type disk;
allocate channel c2 device type disk;
duplicate target database to 'newname';
}
SQLPLUS "/AS SYSDBA"
SELECT NAME,OPEN_MODE,INSTANCE_NAME FROM V$DATABASE,V$INSTANCE;
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home