Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Backing up Ora7.3 database
Steve Hewett wrote:
> I was wondering if any of you could provide some help here. I am new to
> Oracle DB Administration, and I have a need to create a exact duplicate of
> an Oracle 7.3 database under a different schema name. I am wondering if
> anyone could explain how to accomplish this, or point me out to a good
> reference.
To make life easier, I'll assume you are able to close the existing database and also that your datafile names includ the sid of the database. If this is not the case you will have to get in touch with me via email.
alter database backup controlfile to trace;
This will create a .trc in your user_dump_dest directory containing the line CREATE CONTROLFILE - we will need this file later.
2) shudown and backup your existing database - just to be on the safe side.
3) copy all the datafiles of your existing database to new locations for the new database.
e.g. cp /u01/oradata/SID_system.dbf /u01/oradata/NEWSID_system.dbf
4) copy initSID.ora to initNEWSID.ora and edit the file to replace all entries of SID with NEWSID
5) edit the trc file created in 1) to replace all entries of SID with NEWSID only keeping the lines between startup mount and ; on its own. Also replace the line containing CREATE CONTROLFILE with; CREATE CONTROLFILE REUSE SET DATABASE <NEWSID> RESETLOGS NOARCHIVELOG Save this file as newsid_ctl.sql
6) export ORACLE_SID=NEWSID
7) go into svrmgr for the new instance and run the newsid_ctl.sql created in 5.
8) issue the command alter database open resetlogs;
I have written a unix script which automates this for a database operating in archivelog mode, and have used it sucessfully many times to perform point in time recovery of individual database objects (where suitable) so hopefully the steps I have given you should be OK - I apologise if I have left anything out.
Good Luck,
Ian Received on Mon Nov 03 1997 - 00:00:00 CST
![]() |
![]() |