Cloning Database Using Rman
Cloning Database Using Rman
Cloning Database Using Rman
--------------------------------1. Create PFILE for clone database and copy it to clone server
2. Take backup of Production Database and copy it to Clone Server
3. Start Auxillary Instance on Clone Server and Restore the database.
4. Open the Database in Reset Logs
5. Test Clonedb
1-creating pfile for clone database from production spfile.
SQL> create pfile='tmp/initclonedb.ora' from spfile;
copy created spfile to clone DB, ORACLE_HOME/dbs location.
$> SCP 'tmp/initclonedb.ora' oracle@192.82.164.7:/O_H/dbs
c) change Database name in the Parameter file
Change Location details as per Clone DB on Parameter file.
Create all Directories
Edit the /etc/oratab with clone DB details
-- clonedb:)RACL
E_HOME_LOCATION:N
2-Take Backup of Production Database
$> rman target /
RMAN> backup database plus archivelog;
Copy all backup sets to clone server.
scp -r backupset oracle@192.82.164.7:/O_H/flash-recovery/
3-Create a TNS service name on Clonedb
first test,
$> tnsping prodb
il fail
//this w
-- If te
//this w
--connect to Pro
RMAN> run
{
allocate auxiliary channel c1 device type disk;
allocate channel c2 device type disk;
duplicate target database to 'clonedb';
}
--This will create all directory structure in cloedb comparing with Production D
B
--DB files will be automatically detected and copied due to DB_CONVERT parameter
RMAN> exit