1.Use SQL "alter database backup controlfile to trace" to backup the controlfile-created script.
2.shutdown database
3.backup all datafile/controlfile/redofile to a new place in order to prevent the option from mistake.
4.Delete the old controlfile,open tracefile created in step 1 ,update the scripts,I met the 2 errors as the following:
---------------OldName:PROD, New DB Name: TEST ------------------
ERROR 1.CREATE CONTROLFILE reuse DATABASE "TEST" NORESETLOGS NOARCHIVELOG==>error
ERROR 2.CREATE CONTROLFILE set DATABASE "TEST" NORESETLOGS NOARCHIVELOG ==>error
RECOVER DATABASE
# Database can now be opened normally.
ALTER DATABASE OPEN;
Right One is:
CREATE CONTROLFILE set DATABASE "TEST" RESETLOGS NOARCHIVELOG /*Attention point 1*/
RECOVER DATABASE USING BACKUP CONTROLFILE /*Attention point 2*/
# Database can now be opened zeroing the online logs./*Attention point 3*/
ALTER DATABASE OPEN RESETLOGS;/*Attention point 4*/
Following is the detail:
SQL> RECOVER DATABASE
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done

SQL> RECOVER DATABASE using backup controlfile until cancel;
ORA-00279: change 9747475574288 generated at 12/14/2007 00:19:43 needed for
thread 1
ORA-00289: suggestion : /home/oracle/9.2.0/dbs/arch/arch_1_2.arc
ORA-00280: change 9747475574288 for thread 1 is in sequence #2

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/disk1/oradata/prod/log01b.dbf
Log applied.
Media recovery complete.
SQL> alter database open resetlogs; 
Database Altered;5.You can restart use the PLSQL"show parameter db_name" to confirm the actions.
本文详细介绍了使用SQL命令备份及恢复Oracle数据库控制文件的过程,并针对出现的错误提供了正确的解决步骤,包括创建新的控制文件脚本、数据库恢复及开启重置日志等关键操作。
1077

被折叠的 条评论
为什么被折叠?



