Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does db clone need recovery

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
I clone a db from one server to another as folows ;
1. shutdown immediate on server A (Solaris 8, Ora 9i)
2. copy all datafiles to server B (Solaris 8, Ora 9i)
3. startup creating new cntrl file
Usually all is ok but sometimes it says that one of the datafiles needs recovery.
Someone said that the "shutdown immediate" has not shutdown cleanly.
Should I do "shutdown immediate" then "startup" then "shutdown" normal then copy datafiles ?
 
Can you post your script to create the controlfiles for the new clone - presumably this is from a backup controlfile to trace from the original, suitably amended?
 
sounds like missing controlfile in your script. Shutdown immediate shuts down the database cleanly so wheover told u that it incorrect.

shutdown immediate disconnects users and rolls back any running transactions so the db is in a consistent state. Only one you have to worry about is ABORT which needs recovery upon startup!

either check your script or backup your controlfle to trace again to recreate your create controlfile script.

HTH



Sy UK
 
At the risk of repeating myself, can you post your backup controlfile to trace script? It's possible that you're including a resetlogs where you need to specify noresetlogs, or a recover where you don't need one.
 
This is my controlfile to recreate the database ;
STARTUP NOMOUNT
CREATE CONTROLFILE set DATABASE "PROD" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 500
MAXINSTANCES 1
MAXLOGHISTORY 453
LOGFILE
GROUP 1 '/usr/local/erp/oracle/proddata/logPROD1.dbf' SIZE 20M,
GROUP 2 '/usr/local/erp/oracle/proddata/logPROD2.dbf' SIZE 20M
DATAFILE
'/usr/local/erp/oracle/proddata/aad.dbf',
........................
'/usr/local/erp/oracle/proddata/UNDOTS1.dbf'
CHARACTER SET WE8ISO8859P1 ;
ALTER DATABASE OPEN resetlogs;
ALTER TABLESPACE TEMP ADD TEMPFILE '/usr/local/erp/oracle/proddata/temp01.dbf' REUSE;
ALTER TABLESPACE TEMP ADD TEMPFILE '/usr/local/erp/oracle/proddata/temp02.dbf' REUSE;
 
Thanks. That looks OK to me. The only other explanation I can think of is some inconsistency in the actual copying of the datafiles, but that's difficult to prove. Is it always the same datafile that Oracle complains about?
 
Different data files. I will try another os copy method.
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top