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 -> Database refresh

Database refresh

From: Night Shade Books <jasonw_at_nightshadebooks.com>
Date: Sat, 29 Sep 2001 01:17:35 -0700
Message-ID: <F6A70ACD261E3E27.CB7F4D1117FDEBFB.AD7A45E791CCE69B@lp.airnews.net>


Ok, I've been at this for five hours. And I don't go to bed 'til it's fixed.

I'm refreshing a development database, EBDB1. Here's what I've been doing.

  1. I do an RMAN recover of the latest production backup to a db called PRDIMG.
  2. I shut down PRDIMG. I shut down EBDB1.
  3. I whack the datafiles, control files and redo logs from the box that EBDB1 runs on.
  4. I copy all of the datafiles and redo logs to the box (Unix) that has EBDB1, into the appropriate directories.
  5. I go into svrmgrl, connect internal. I do a startup nomount.
  6. I issue 'alter database backup controlfile to trace'
  7. I rename the trace file to ccf.sql, and then I edit it. I change:

CREATE CONTROLFILE REUSE DATABASE "EBDB1" NORESETLOGS NOARCHIVELOG to
CREATE CONTROLFILE REUSE DATABASE "EBDB1" RESETLOGS NOARCHIVELOG   I also make sure all of the directory filemaps are correct.

8. svrmgrl again. I shut down EBDB1. I run ccf.sql

9. It tells me this:

CREATE CONTROLFILE REUSE DATABASE "EBDB1" NORESETLOGS NOARCHIVELOG
*

ORA-01503: CREATE CONTROLFILE failed
ORA-01161: database name PRDIMG in file header does not match given name of EBDB1
ORA-01110: data file 1: '/u02/oradata/EBDB1/system01.dbf' ORA-01507: database not mounted

  1. So I edit the ccf.sql again, and change REUSE to SET. And run it again (after a shutdown). It tells me:

CREATE CONTROLFILE SET DATABASE "EBDB1" RESETLOGS NOARCHIVELOG
*

ORA-01503: CREATE CONTROLFILE failed
ORA-00200: controlfile could not be created
ORA-00202: controlfile: '/u02/oradata/EBDB1/control01.ctl'
ORA-27038: skgfrcre: file exists
ORA-01507: database not mounted

  1. Ok, so I need to get rid of the existing control files first. No problem. So I whack the controlfiles. And I run it again. It tells me:

ORA-00283: recovery session canceled due to errors ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

Groovy. So it created the new control file without errors. But now I need to do another 'alter database backup controlfile to trace' because I can't open the db (alter database open resetlogs).

What the hell do I do now? If I run the tracefile, it's either going to tell me that the control files already exist, or it's going to tell me the file headers don't match, or it's going to tell me that I need to BACKUP CONTROLFILE again. It seems I'm stuck in this infinite loop, and I have no clue what to do next.

I'm guessing that there's something I need to do to the new tracefile to finish this up, but for the life of me, I can't figure out what.

HELP! Thanks,

Jason Williams
ebates.com dba Received on Sat Sep 29 2001 - 03:17:35 CDT

Original text of this message

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