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: manual clone of database

Re: manual clone of database

From: sybrandb <sybrandb_at_gmail.com>
Date: 5 Apr 2007 07:44:57 -0700
Message-ID: <1175784297.740961.136560@e65g2000hsc.googlegroups.com>


On Apr 5, 4:20 pm, "chris.faulk..._at_gmail.com" <chris.faulk..._at_gmail.com> wrote:
> On Apr 5, 3:12 pm, "sybrandb" <sybra..._at_gmail.com> wrote:
>
>
>
>
>
> > On Apr 5, 3:56 pm, "chris.faulk..._at_gmail.com"
>
> > <chris.faulk..._at_gmail.com> wrote:
> > > Hi
>
> > > I am trying to manually clone a database, but also renaming the
> > > database.
>
> > > On the source system, I issue an 'ALTER DATABASE BACKUP CONTROLFILE TO
> > > TRACE' and then copy the trace file from this and all datafiles to the
> > > target system. I edit the output from the trace file, replacing file
> > > paths and database names where appropriate.
>
> > > On the destination system, the database already exists. It is shutdown
> > > and all data files and redo-logs over-written and some new tablespaces
> > > added in the data directory. I place the init[SID].ora file and then I
> > > issue the CREATE CONTROLFILE command from the trace file. I am told
> > > that the controlfile is created. I have tried this with ARCHIVELOG and
> > > NOARCHIVELOG and with SET DATABASE to create new controlfiles.
>
> > > But, when I try the next step,
> > > SQL> alter database open resetlogs;
> > > alter database open resetlogs
> > > *
> > > ERROR at line 1:
> > > ORA-01194: file 1 needs more recovery to be consistent
> > > ORA-01110: data file 1: '/u02/oradata/P1THUR/system01.dbf'
>
> > > OK, so I try to recover ...
>
> > > SQL> recover database using backup controlfile;
> > > ORA-00279: change 11276017 generated at 04/04/2007 12:05:45 needed for
> > > thread 1
> > > ORA-00289: suggestion : /u02/orabackup/P1THUR/
> > > archive1_702_611010067.dbf
> > > ORA-00280: change 11276017 for thread 1 is in sequence #702
>
> > > Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
> > > AUTO
> > > ORA-00308: cannot open archived log
> > > '/u02/orabackup/P1THUR/archive1_702_611010067.dbf'
> > > ORA-27037: unable to obtain file status
> > > IBM AIX RISC System/6000 Error: 2: No such file or directory
> > > Additional information: 3
>
> > > I try CANCEL as well but this won't recover to the point when I can
> > > start the database. I also try to revover that problem datafile '/u02/
> > > oradata/P1THUR/system01.dbf'.
>
> > > Please - anyone got any better ideas or references on this. I have
> > > done this before successfully albeit without a database rename. I
> > > didn't copy any archived logs over so I don't understand why it is
> > > asking for that /u02/orabackup/P1THUR/archive1_702_611010067.dbf
> > > file. It doesn't exist on the source or destination system.
>
> > > I'd be grateful for any insights !
>
> > > Thanks
>
> > > Chris
>
> > I recall several situations where I ran into the same problem, and I
> > had to specify one of the *online* redologs as source. You'll need to
> > find out in which online redo log the SCN reported is.
>
> > hth
>
> Sounds great - sorry to be so dumb but how do I specify one of the
> online redologs "as source" ? What does that last part mean. Please
> bear with me !
>
> Chris- Hide quoted text -
>
> - Show quoted text -

When you are prompted (see above) to specify a filename, or auto or cancel, you specify the name of the redolog you found by selecting from v$log and v$logfile.
You have both the SCN (11276017) and the sequence# column (702), so you should be able to identify the file. The name you see in the prompt, is the name Oracle would give the file after archiving.

--
Sybrand Bakker
Senior Oracle DBA
Received on Thu Apr 05 2007 - 09:44:57 CDT

Original text of this message

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