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

Home -> Community -> Usenet -> c.d.o.misc -> Re: export/import different SID

Re: export/import different SID

From: Huberto Kusters <Huberto.Kusters_at_abp.nl>
Date: Thu, 24 Feb 2000 15:32:54 +0100
Message-ID: <893feq$h5r10@abp.nl>


Hi,

There is also another way to 'clone' or move a database to another machine which I have done serveral times in an unix environment :

Connect to the original database with svrmgrl and issue the following command :
'alter database backup controlfile to trace resetlogs;' This will create a .trc file in the background_dump_dest which consists of sql-statements, needed to recreate the controlfiles.

Shutdown the database normally or immediate and copy all datafiles (except the controlfiles and logfiles) to the new locations (ftp, backup, cp).

Edit the tracefile :

1. remove everything from the start until (not including) 'startup nomount'.
2. place the keyword 'set' between 'reuse' and 'database'.
3. replace all old databasenames with the new database name.
4. change all locations of the files to reflect there new locations
5. remove all lines after the 'create controlfile...' statement
Save this trace file with a new name (i.e. rename.sql)

Copy the original init.ora file to the new location and edit it : 1. replace all old databasenames with the new database name. 2. change the locations of files (control_files, user_dump_dest, etc)

Set the oracle environment to the new database (oracle_home, oracle_sid).

Start servermanager :

'svrmgrl'
'connect internal'
'@rename'
'alter database open resetlogs;'
'alter database rename global_name to <new_dbname>;'
'exit'

This whole exercise only creates new controlfiles for a database. However, this gives you the opertunity to change things like the name of the database, location of files, etc. The resetlogs is necessary to recreate the logfiles.
Do not try this on a production database. Only on copied databases unless you have backed up you database.

DO NOT TRY THIS IN A NT ENVIRONMENT. I have not tested this in a NT environment, yet.

Best regards,

Huberto

Derrius Marlin <dmarlin_at_biostat.ufl.edu> schreef in berichtnieuws 38B2B5EE.F73B92F6_at_biostat.ufl.edu...
> Can a a full or user mode export be imported into a new DB
> (different machine) with a different SID?
>
> What I want to do is to move a DB (mostly all objects associated
> with a particular schema) from one machine to another both using
> Oracle 7.3.4. In the process I want to use a different SID name
> and locate the datafiles in different paths than the original DB.
>
> Any suggestions for how to best do this would be appreciated.
>
> Thanks much,
> --
> -Derrius
>
> ----------- --------------
> Derrius Marlin, Systems Manager University of Florida
> dmarlin_at_biostat.ufl.edu Division of Biostatistics
> http://www.biostat.ufl.edu/~dmarlin (352) 392-8446
Received on Thu Feb 24 2000 - 08:32:54 CST

Original text of this message

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