How are you trying to clone the database? Are you using RMAN or user managed backups..And could you let us know the steps you have performed and also the error being faced by you..
You do not need the redo log for recovery. You will require only the datafiles and the archived logs. You will be required to do incomplete recovery in this case. In case you are using RMAN, you can do following
run
{
set until time “to_date(’24-nov-2008 16:00:00′, ‘dd-mon-rrrr hh24:mi:ss’)”;
3.copy all the datafiles from source to target server.
4.alter system switch logfile;(2-3 times)
5.alter database backup controlfile to trace;
to generate a trace of the control file
go to the udump location and copy the last trace file
make chages and generate the control file script
for e.g
copy the contents of trace file from create controifile reuse….. character set
and made some changes like inplace of reuse i write set as i am my database name is different from the source one.
save the file as create.sql
on target server:
set the sid of target db.
then conect to database using sqlplus
create the dir udump, bdump and cdump.
copy the pfile from the source database to the target database and made changes accordingly like dbname , path of controlfile as i am using different location for control file.
startup the database in nomount stage
run the script which i generated in step 5.
on sql prompt i got the result as file created.
now when i try to open the database using reset log option
alter database open resetlogs;
now i am getting an error that system01.dbf needs recovery.
when i execute the conmmand
recover database using backup controlfile until cancel;
again i am getting an error.
the error is
ORA-01110
i didnt remember the error exactly.
I have one doubt if i will not copy the online redo log then how it will get generated.
<I>I have one doubt if i will not copy the online redo log then how it will get generated.</I>
>> When you open the database with resetlogs , it will create the redo logs.
Secondly did you copy the archived logs after you ended the backup (Also had to issue switch logfile). I did a test setup and you need to issue following
<br />
SQL> recover database using BACKUP CONTROLFILE until cancel;<br />
ORA-00279: change 542839 generated at 11/25/2008 02:38:29 needed for thread 1<br />
ORA-00289: suggestion :<br />
/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area/TEST/archivelog/2008_11_<br />
25/o1_mf_1_3_%u_.arc<br />
ORA-00280: change 542839 for thread 1 is in sequence #3<br />
<br />
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}<br />
You need to give the archived log name here and then say “Cancel” and open the database
<br />
<br />
/u01/app/oracle/oradata/TEST/o1_mf_1_3_4lqgzpsg_.arc<br />
ORA-00279: change 543072 generated at 11/25/2008 02:48:54 needed for thread 1<br />
ORA-00289: suggestion :<br />
/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area/TEST/archivelog/2008_11_<br />
25/o1_mf_1_4_%u_.arc<br />
ORA-00280: change 543072 for thread 1 is in sequence #4<br />
ORA-00278: log file '/u01/app/oracle/oradata/TEST/o1_mf_1_3_4lqgzpsg_.arc' no<br />
longer needed for this recovery<br />
<br />
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}<br />
/u01/app/oracle/oradata/TEST/o1_mf_1_4_4lqgzsbq_.arc<br />
ORA-00279: change 543074 generated at 11/25/2008 02:48:57 needed for thread 1<br />
ORA-00289: suggestion :<br />
/u01/app/oracle/product/10.2.0/db_1/flash_recovery_area/TEST/archivelog/2008_11_<br />
25/o1_mf_1_5_%u_.arc<br />
ORA-00280: change 543074 for thread 1 is in sequence #5<br />
ORA-00278: log file '/u01/app/oracle/oradata/TEST/o1_mf_1_4_4lqgzsbq_.arc' no<br />
longer needed for this recovery<br />
<br />
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}<br />
cancel<br />
Media recovery cancelled.<br />
SQL> alter database open resetlogs;<br />
<br />
Database altered.<br />
What i did in my case i applied the path of online redolog files and it worked.
my database is new. client request me to create a database and suddenly asked me to clone the DEV database with PROD DB. so archive was generated in my case. becasue of this reason i applied online redolog path and then cancel
This blog reflect our own views and do not necessarily represent the views of our current or previous employers.
The contents of this blog are from our experience, you may use at your own risk, however you are strongly advised to cross reference with Product documentation and test before deploying to production environments.
Recent Comments