ORACLE: DB CLONE
There are many ways to cloning, this is one. We are going to take a hot backup of the Primary database by 1. putting db into 'alter database begin backup;' mode, 2. copying the Primary's .DBF Files, 3. Backing up a Controlfile using the following. Alter database backup controlfile to Trace as 'Path'; We will need to tweak this file in order to create a controlfile from it. (delete unnecessary lines, Replace Reuse with SET and use RESETLOGS) 5. We then create an INITSID.ORA file in the database folder.....giving db_name as the only mandatory parameter. ( In some cases we need to also provide the Compatibility) 6. dimora -new -sid dbname will create on windows account a new Service that you can then start up using NET START ORACLESERVICEsid 8. Start up Clone database in nomount mode, all by using the controlfile trace. 9. Take database to mount mode. 10. provide archivelog source and apply all archive logs using set logsource ='path' recover database using backup controlfile until cancel; 11. Alter database open resetlogs; and you have a clone. Congratulations! c:\>echo %oracle_sid% harry2 c:\>sqlplus SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jul 24 03:14:26 2011 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Enter user-name: /as sysdba Connected to an idle instance. USER is "SYS" SQL> @c:\trace.sql ORACLE instance started. Total System Global Area 117440512 bytes Fixed Size 1289196 bytes Variable Size 58721300 bytes Database Buffers 50331648 bytes Redo Buffers 7098368 bytes
Categories: HOME
Comments (0)
Trackbacks (0)
Leave a comment
Trackback