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: Cloning Databases

Re: Cloning Databases

From: James Lorenzen <james_lorenzen_at_allianzlife.com>
Date: Mon, 29 Nov 1999 20:22:49 GMT
Message-ID: <81unak$2bq$1@nnrp1.deja.com>


Oracle checks for running instances and gets the database name that is being accessed by the running instance. (The database name is in the header of each datafile). Oracle will not let you rename a database when there is an instance that is using the same database name. That is why you can complete the task when the production instance is shut down.

You are attempting to "rename" a database with the SET db_name on the CREATE CONTROLFILE statement.

I have "pulled" this off by creating the controlfile and doing this renaming via NFS mounting the files on a different machine and creating the instance (and renaming the database) on the other machine. This is very slow. WARNING, if your create controlfile points to a production file, you will have damaged production. Be very careful, and always have current backups.

HTH
    James

In article <004aa0e3.9e16aa43_at_usw-ex0102-009.remarq.com>,   MohammedB <mohammedbNOmoSPAM_at_iadb.org.invalid> wrote:
> Folks (Oracle 7.3.3.5 AIX 4.2 and small databases),
>
> We have this procedure where we can clone databases from one set of
> datafiles to another. Basically what happens is that at night we
> shutdown our main database and copy the datafiles to a stage area. We
> than startup our main database. Now, we copy the files from the
> staging area to a new location (same machine). Next, a new instance is
> created and mounted as 'alter database nomount'.
>
> The original database is up an running while this is executed:
>
> CREATE CONTROLFILE
> SET DATABASE "DB_CLONE" RESETLOGS NOARCHIVELOG
> MAXLOGFILES 32
> MAXLOGMEMBERS 2
> MAXDATAFILES 50
> MAXINSTANCES 8
> MAXLOGHISTORY 800
> LOGFILE
> GROUP 1 '/dev1/db_clone/log1.dbf' SIZE 1M,
> GROUP 2 '/dev2/db_clone/log2.dbf' SIZE 1M
> DATAFILE
> '/dev3/db_clone/systemdb_clone.dbf',
> '/dev4/db_clone/temp1.dbf',
> '/dev4/db_clone/data1.dbf',
> '/dev4/db_clone/index1.dbf'
> ;
> alter database open resetlogs;
>
> When we try and do this with the original database up the following
> errors are generated:
>
> ORA-01503: CREATE CONTROLFILE failed
> ORA-01565: error in identifying file
> '/saa15/pastrain/systemdb_clone.dbf'
> ORA-09782: sfifi: another instance has the same database mounted.
>
> The only way to get around this is to shutdown the original instance
> and then bring up the new cloned instance. After this, the original
can
> be brought up.
>
> If you've read this, thanks. Now the question. I think this is the key
> error:
>
> 09782, 00000, "sfifi: another instance has the same database mounted."
> // *Cause: In non-shared disk systems, database cannot be mounted
> shared.
> // *Action: Shutdown the other oracle instance and try again. The
name
> // of the other instance was dumped to the trace file.
>
> Can anyway explain to me what is happening as Oracle tries to create a
> new instance in this case? Is there a way around this and still have
> the original up at the same time?
>
> Thanks
>
> mkb
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Nov 29 1999 - 14:22:49 CST

Original text of this message

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