TEST DB Cloning
TEST DB Cloning
If database running in pfile using os command to copy the pfile and placed in
backup path.
4.Shutdown immediate
5.Copy all the data files/log files using os command & placed in backup
path.
Database cloning(Renaming)
/d03/oracle10g/oradata/CLNTEST
/d03/oracle10g/admin/CLNTEST
4 Copied Sql statements for generating control files into create_control_file.sql from trace file.
Changed dbname.
Change ‘reuse’ to ‘set’
With resetlog option
/d03/oracle10g/admin/CLNTEST/udump/ create_control_file.sql
5. Set oracle_sid
$export ORACLE_SID=CLNTEST
$echo $ORACLE_SID(it should display the newdb name)
Startup nomount.
@/d03/oracle10g/admin/CLNTEST/udump/create_control_file.sql
************************************************************************
**********
If database running in pfile using os command to copy the pfile and placed in backup
path.
3.Put the tablespace in begin backup mode Using os command to copy the datafiles
belongs to begin backup mode tablespace & placed in backup path. (Refer below
example)
4.Once copied the datafile, release the tablespace from begin backup mode to end backup
5.Repeat the steps 1-3 for all your tablespaces.
6.Taken the controlfile backup
Alter database backup controlfile to trace as ‘/u01/backup/control01.ora’;
7.Backup all your archive log files between the previous backup and the new backup as
well.
Example:
steps:
2.Alter tablespace system begin backup;
1.Create the appropriate folder in corresponding path & placed the backup files in
corresponding folder.(bdump,udump,create,pfile,cdump,oradata)
2.Change the init.ora parameter like control file path, dbname, instance name etc...