-
How to Clone a 9i Database
I have an Oracle 9.2.0.7 database (Enterprise Edition) I need to copy from one HP-UX server to another one. They have different filesystem names and different database names. I'm trying to find a fast method to do this for our production go live and it seems like if I knew how to clone, that would be my best bet. We do not use RMAN in our company. I would have do perform a cold backup first. Can someone give me the steps please. Thanks in advance.
AMH
Last edited by amhood; 12-30-2008 at 02:45 PM.
-
The idea is to create a new database in target box as a clone of what you have in source box.
1- Put source database in backup mode
2- DD all source datafiles to target box.
3- Create control file on source database.
4- Take source database out of backup mode
5- Copy created control file and archive logs generated since step #1 from source to target box.
6- Edit control file on target box to match filesystems, etc. Be sure you set the new database name correctly, it should look like...
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "YOURDBNAME" RESETLOGS ARCHIVELOG
. . .
rest of the control file
. . .
7- sqlplus /nolog
conn sys as sysdba
enter
@yourcontrolfile.sql
8- RECOVER DATABASE USING BACKUP CONTROLFILE until cancel
9- cancel
10- alter database open resetlogs
11- shutdown immediate
12- startup
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
-
Thanks for your reply. I have a question. We do cold backups (no RMAN) so, do I create the control file before I shutdown the database or after? Is is the database fully open or just mounted? Thanks.
-
Thanks for your reply. I have a question. We do cold backups (no RMAN) so, do I create the control file before I shutdown the database or after? Is is the database fully open or just mounted? Thanks.
-
The best method I prefer is,
rman duplicate database
Please do a internet search "rman duplicate database".
Regards
Boban
-
We do not use RMAN at our company. I'll have to do a cold backup.
-
Boban -
Amhood clearly stated that they don't use RMAN. The steps PAVB mentioned are the right choice in this scenario.
Thanks,
Vijay Tummala
Try hard to get what you like OR you will be forced to like what you get.
-
ok. I missed out that.
What is the database size ?
I prefer putting tablespace in backup mode one by one and scp/rcp to target instead of putting whole database in backup mode in one shot even if the feature is available.
-
We do not use RMAN. I would have to do a cold backup. The database is only 26g.
-
If you have cold backup as backup strategy, then is is too easy. I assume archive log is disabled for your database.
You can create controlfile script before or after cold backup, doesn't matter.
You just want to restore the cold backup to target server. Modify control file script. Following is an example..
========================================
STARTUP NOMOUNT
CREATE CONTROLFILE
SET DATABASE "<>" --> CHANGE "REUSE" TO "SET"
RESETLOGS FORCE LOGGING ARCHIVELOG --> Change as per your environment
MAXLOGFILES 32
MAXLOGMEMBERS 5
MAXDATAFILES 2079
MAXINSTANCES 8
MAXLOGHISTORY 65535
LOGFILE --> Redo log files ...
GROUP 1 ( --> Change path and naming convensions as per target server
'PATH/redo11.log',
'PATH/redo12.log'
) SIZE 100M,
GROUP 2 (
'PATH/redo21.log',
'PATH/redo22.log'
) SIZE 100M,
GROUP 3 (
'PATH/redo31.log',
'PATH/redo32.log'
) SIZE 100M,
DATAFILE
<<... Datafile list....>>
<<... Change path and naming convensions as per target server >>
========================================
Add temp files after that..
========================================
ALTER TABLESPACE TEMP ADD TEMPFILE 'PATH/tempfileName'
SIZE <> M REUSE AUTOEXTEND OFF;
========================================
Please come back if you required any clarification.
Regards
Boban
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|