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: Problems cloning a database/database instance

Re: Problems cloning a database/database instance

From: ohaya <ohaya_at_cox.net>
Date: Mon, 14 Jun 2004 21:30:30 -0400
Message-ID: <40CE5136.E648574C@cox.net>

ohaya wrote:
>
> dias wrote:
> >
> > Hi,
> >
> > In the trace file generated with "alter database backup controlfile
> > ..." there two sections, one with noresetlogs and another with
> > resetlogs.
> >
> > You have to modify the trace file to use it. For example, use the
> > first part :
> >
> > CONNECT /@test AS SYSDBA
> > STARTUP NOMOUNT
> > CREATE CONTROLFILE REUSE DATABASE "TEST" NORESETLOGS NOARCHIVELOG
> > MAXLOGFILES 50
> > MAXLOGMEMBERS 5
> > MAXDATAFILES 100
> > MAXINSTANCES 1
> > MAXLOGHISTORY 226
> > LOGFILE
> > GROUP 1 'E:\Cloned\REDO01.LOG' SIZE 100M,
> > GROUP 2 'E:\Cloned\REDO02.LOG' SIZE 100M,
> > GROUP 3 'E:\Cloned\REDO03.LOG' SIZE 100M
> > DATAFILE
> > 'E:\Cloned\SYSTEM01.DBF',
> > 'E:\Cloned\UNDOTBS01.DBF',
> > 'E:\Cloned\CWMLITE01.DBF',
> > 'E:\Cloned\DRSYS01.DBF',
> > 'E:\Cloned\EXAMPLE01.DBF',
> > 'E:\Cloned\INDX01.DBF',
> > 'E:\Cloned\ODM01.DBF',
> > 'E:\Cloned\TOOLS01.DBF',
> > 'E:\Cloned\USERS01.DBF',
> > 'E:\Cloned\XDB01.DBF'
> > CHARACTER SET WE8MSWIN1252
> > ;
> >
> > RECOVER DATABASE
> >
> > ALTER DATABASE OPEN;
> >
> > ALTER TABLESPACE TEMP ADD TEMPFILE 'E:\Cloned\TEMP01.DBF'
> > SIZE 41943040 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
> >
> > Dias
> >
>
> Hi,
>
> I've started this whole thing again, "from scratch", so please bear with
> me.
>
> To begin with, in OEM, I created a new database/instance called
> "TEST1". I want clone TEST1 to a new database and database instance,
> "CTEST1".
>
> I then shutdown the instance, and am trying to follow the procedure at:
>
> http://www.pgts.com.au/pgtsj/pgtsj0211b.html
>
> This procedure seems to clone the database, and rename it, and create
> the cloned instance.
>
> I'm kind of stuck at Step 5. In that step, it looks like you create a
> .SQL file that does just the CREATE CONTROLFILE. Then it says to use
> SVRMGRL, but I guess that since I'm using 9i, I have to used SQLPlus.
>
> According to Step 5, I'm suppose to do a "STARTUP NOMOUNT", then a
> "@ctrl<NEW_SID>". In my case, I named the .SQL file MkCloned.sql, so
> presumably, that should be "@mkcloned.sql".
>
> The problem that I'm having is: Which instance do I login to before I do
> the "STARTUP NOMOUNT" and run the "@Mkcloned.sql" in Step 5? I can't
> login to the CTEST1 instance, because it doesn't exist yet!
>
> Thanks,
> Jim

Hi,

My sincerest apologies for bouncing back and forth between different procedures, but I decided to go back and try:

http://www.sap-img.com/oracle-database/cloning-a-oracle-database.htm

And, at this point, I think that I've been somewhat successful, in that I think that I've been able to get through "Step 1" (Cloning the database) successfully. If I look at the database TEST1 now in OEM, I can see the Control Files and the database files pointing to e:\Cloned\oradata\TEST1 instead of the original e:\oracle\oradata\test1, i.e., the TEST1 instance now appears to be using the database files in e:\Cloned\oradata\TEST1.

BUT now, I'm kind of stuck on "Step 2" (Changing the Instance Name). I've run Oradim:

oradim -new -sid CTEST1

but when I "SET ORACLE_SID=CTEST1", then start up sqlplusw and try to connect to CTEST1:

connect sys/password_at_ctest1 as sysdba

I'm getting:

SQL> connect sys/password_at_ctest1 as sysdba ERROR:
ORA-12505: TNS:listener could not resolve SID given in connect descriptor

Can anyone tell me what I'm doing wrong?

Thanks!

Jim Received on Mon Jun 14 2004 - 20:30:30 CDT

Original text of this message

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