I want to restore database to new oracle server from cold backup . As I understand I need to restore copy of init.ora, control files, redo logs to new server under exactly same stucture as old one. Do I need to copy archived logs too.
may be very dumb question but I am going to ask anyway....
when database is shutdown,all transactions are written to datafiles then why is it necessary to copy redo log files, aren't data files sufficiant to open database on new server?
Thanks. So essentially steps I need to follow are
1.shutdown database on old server and take copy of init.ora, contolfiles, datafiles and redo log files to new server in the same directory strucure.
2. On new server set up oracle sid same as old one
startup instance using copied init.ora file
3. mount and open database.
Tried it, When tried to open it by giving
Alter database open command , it prompted to use restlogs option. so did
alter database open resetlogs ;
ORA-01194 File1 needs more recovery to be consistent
ORA-01110 Data File1:'/usr2/oracle/product/10g/oradata/.../system01.dbf'
Have you coppied the redo logs as well? If so, try
alter database open ( without resetlogs)
If not, try
Recover database until cancel
and enter CANCEL immediately when asked
(if not asked at all do not worry about that)
When that's finished, go for
alter database open resetlogs;
I hope that works ( one never knows with that ;-))
I am writing all the steps required for database cloning.
Use alter system switch logfile;
This will forcibly do database wide checkpoint ( which is also equivalent to shutdown normal).
Alter database backup controlfile to trace resetlogs;
Show parameter user_dump will give you the path where trace(.trc) file of control file is placed.
The .trc will contain the create controlfile …. Statement
Scoop out everything from it leaving the create contol file Reuse database ……. Statement
Copy all the database files (including Init.ora file) (With database as shutdown normal) as mentioned in create controlfile statement from source to target destination.
Install Oracle10g software without creating the sample database.
Since I used a new database name in the target server modify entries in init.ora like db_name as well as the directory structures as where you will place the control files , redo files and datafiles.
Modify the .trc file for control file as CREATE CONTROLFILE REUSE SET DATABASE RESETLOGS ARCHIVELOG with all the new directory structures and save the file as ctrl.sql ( could be any name only extn should be .sql).
Create an instance in target server using oradim utility for eg
Oradim –new –sid -syspwd -startmode auto –pfile file=’ give the path for init.ora’
After creating the instance say instance is Test and sys password is oracle log in as