How to duplicate Oracle Database on NT?

Question:

Hi

I want to create an oracle database on a windows nt m/c. I am using
Oracle 8.0.5. We have already a database on this m/c and we want to
create another database which is a copy of the existing database.

The steps i followed are :

1) Do the Alter database backup control file to trace from the 1st
database.
2) Shutdown the 1st Database
3) Create a new oracle instance.
4) Copy all the database files and log files to the new directory.
5) Modify the init.ora of the 2nd instance to specify the db_name etc.
6) Change the trace file generated by control file to trace utility to
specify the new db_name (same as the init.ora of the 2nd database).
7) Startup Nomount the 2nd instance.
8) Then i am trying to create the control file using the trace file and
i am getting an error that Oracle db_name conflict with the data file
header.

I was under the impression that Oracle keeps the database name only in
control file and init.ora file.

thks & regards
Avinish

Answer1:

Hi
Check out this article on cloning...

http://www.oracle.com/oramag/oracle/00-Mar/o20dba.html

Martin

Answer2:

Your create controlfile should look something like:

CREATE CONTROLFILE
SET DATABASE "GDEV" RESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 1000
    MAXINSTANCES 1
    MAXLOGHISTORY 452
LOGFILE
  GROUP 1 'F:\ORACLE\GDEV\LOGGDEV1.ORA'  SIZE 5000K,
  GROUP 2 'F:\ORACLE\GDEV\LOGGDEV2.ORA'  SIZE 5000K
DATAFILE
  'F:\ORACLE\GDEV\SYS1GDEV.ORA',
  'F:\ORACLE\GDEV\RBSGDEV.ORA',
  'F:\ORACLE\GDEV\TMP1GDEV.ORA',
  'F:\ORACLE\GDEV\TOOLGDEV.ORA',
  'F:\ORACLE\GDEV\INDX1GDEV.ORA';

And if the instance is going to be on the same machine, your source instance
needs to be shutdown until after you run this create controlfile script.

Let me know if you need any more specifics.
 

Hosted by www.Geocities.ws

1