Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle8 - copying a database.

Re: Oracle8 - copying a database.

From: raman batra <rrbatra_at_feist.com>
Date: Sat, 22 Aug 1998 22:54:14 -0500
Message-ID: <35DF9266.6BE1@feist.com>


My last posting got sent before I completed:

Actually, this a shorter way, if you can handle it.

  1. In your source database, generate a list of datafiles (including RBS) and redo log members.
  2. Do a ALTER DATABASE BACKUP CONTROL FILE to TRACE NORESETLOGS in svrmgrl or sql worksheet
  3. Shutdown the source database. (SHUTDOWN IMMEDIATE)
  4. At your new destination, put the datafiles and redo log members (copied from source) in the relevant directories. (if you do FTP, do a binary transfer)
  5. Take a copy of your INIT<sid>.ORA and copy it to the new destination. Edit it to change the database name and the locations of your control file(s) in your new destination
  6. Do NOT take the control files from your source database. We are going to fake a loss of control file.
  7. Use the manreadable trace file you got from command #2. Change the old instance name to the new instance name you want. Save this file as a .SQL file.
  8. The first line of your create control file script should read as: CREATE CONTROLFILE SET DATABASE 'whatever your target name'
  9. Basically, you are going to fake a loss of a control file for the new database and then you make structural changes to your new db in the create control file script (new locations etc)
  10. The SET DATABASE command gives a new database name to your database
  11. You may have to do a RECOVER DATABASE. However if your cold backup (step 3) was good, you will not need logs to roll forward.
  12. Finally change the global_name of the database. IT will still have the old global_name

This way all your grants, users, etc. are copied/cloned. I find it easier than exporting the whole
database

Have fun, let me know if you need any more help

Raman Batra, Oracle DBA

> 1. In your source database, generate a list of datafiles (including
> RBS) and redo log members.
> 2. Do a ALTER DATABASE BACKUP CONTROL FILE to TRACE.
> 3. Shutdown the source database.
> 4. At your new destination, put the datafiles and redo log members
> (copied from source) in the relevant directories.
> (if you do FTP, do a binary transfer)
> 5. Take a copy of your INIT<sid>.ORA and copy it to the new
> destination. Edit it to change
> the database name and the locations of your control file(s) in your
> new destination
> 6. Do NOT take the control files from your source database. We are
> going to fake a
> loss of control file.
> 7. Use the manreadable trace file you got from command #2.
> 8. Change the old instance name to the new instance name you want.
> 1. In your source database, generate a list of datafiles (including
> RBS) and redo log members.
> 2. Do a ALTER DATABASE BACKUP CONTROL FILE to TRACE.
> 3. Shutdown the source database.
> 4. At your new destination, put the datafiles and redo log members
> (copied from source) in the relevant directories.
> (if you do FTP, do a binary transfer)
> 5. Take a copy of your INIT<sid>.ORA and copy it to the new
> destination. Edit it to change
> the database name and the locations of your control file(s) in your
> new destination
> 6. Do NOT take the control files from your source database. We are
> going to fake a
> loss of control file.
> 7. Use the manreadable trace file you got from command #2.
> 8. Change the old instance name to the new instance name you want.
. From a cold backup (shutdown immediate, step 3), you probably

    will not need any logs to roll forward from

> Bruno wrote:
> >
> > I would like to know if someone can tell me how to copy (migrate) an
> > Oracle8 (Enterprise Edition) database from one computer to another. The two
> > computers are connected and both have the Oracle8 Enterprise Edition
> > installed.
> >
> > I already tried to copy the entire Orant directory from one computer to
> > the other but it didn't work.
> >
> > If someone knows how to do it and needs more info on what I have
> > installed, just ask.
> >
> > Thank you.
> >
> > Bruno.
Received on Sat Aug 22 1998 - 22:54:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US