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: Online backup and renaming an instance

Re: Online backup and renaming an instance

From: Hartmut Göhrt <goehrt_at_t-online.de>
Date: Fri, 9 Nov 2001 14:12:08 +0100
Message-ID: <9sgkoe$uqi$04$1@news.t-online.com>


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 where
STATUS='CURRENT')
7. copy offline redos between begin and end backup
8. modify controlfile trace
9. start target database in nomount

10. apply controlfile trace
11. recover database until SCN-1 using backup controlfile; (SCN-1 = SCN from #5 minus 1)
12. alter database open restlogs

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

Original text of this message

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