Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Online backup and renaming an instance
Hi Knut,
I don't know where you are going wrong - I think it is not No.10 in your list. You are taking the copied database into a consistent state at No. 3 (open resetlogs..), so there's no need in doing a resetlogs again. Step 7 should be a "backup controlfile to trace noresetlogs", so you should be able to open the database just with a norma startup.
I recently scripted a copy mechanism, and I use the following steps (I know that this method works, we're doing this every night):
1. alter database backup controlfile to trace noresetlogs 2. alter tablespace <ts_name> begin backup 3. copy datafiles, controlfiles, online redos 4. alter tablespace <ts_name> end backup 5. alter system switch logfile 6. look up last SCN in V$LOG (select FIRST_CHANGE# from V$LOG whereSTATUS='CURRENT')
7. copy offline redos between begin and end backup 8. modify controlfile trace 9. start target database in nomount
During the copy changes on the db structure (add datafile, etc.) are forbidden!
regards
Hartmut
"Knut Talman" <knut.talman_at_mytoys.de> schrieb im Newsbeitrag
news:3BEA9E1F.ABEDE573_at_mytoys.de...
> Hi,
>
> I would like to do the following:
>
> On our production system (Sun E3500, Solaris 2.6), we have a database
> (Oracle 8.0.5.2, Sybrand, I know it is desupported) which is always
> online and backed up with an online backup. I now want to clone the
> production database to have a test environment. I thought I can copy all
> the datafiles (from the online backup) to the new machine, also the
> backup controlfile and teh archived logs. I then:
>
> 1. startup the database there,
> 2. do a media recovery,
> 3. open the database w/ resetlogs,
> 4. shut it down,
> 5. do an offline backup,
> 6. start it again,
> 7. back up controlfile to trace,
> 8. modify the trace controlfile to reflect the new instance name,
> 9. apply the resulting file,
> 10. open the instance with the new name.
>
> Number 10 is the problem. When I try a "alter database open resetlogs"
> the database tells me that file "sys01.dbf" needs recovery. But I have
> no valid archived redo logs for a recovery.
>
> Where am I going wrong?
>
> Thank you in advance,
>
> Knut
Received on Fri Nov 09 2001 - 07:12:08 CST