在mount状态下执行alter database backup controlfile to trace as 'xxx';
复制创建控制文件的内容,例如下边的步骤中提示
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 23360
LOGFILE
GROUP 1 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 2 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG' SIZE 50M BLOCKSIZE 512,
GROUP 3 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO03.LOG' SIZE 50M BLOCKSIZE 512
DATAFILE
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\ORCL_DATA.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\ORCL_01.DBF',
'D:\APP\ADMINISTRATOR\ORADATA\ORCL\ORCL_02.DBF'
CHARACTER SET AL32UTF8;
第一种情况,如果是完整恢复,需要制定NORESETLOGS选项,进行一下步骤:
mount->执行创建控制文件脚本-〉RECOVER DATABASE-〉ALTER DATABASE OPEN;完美结局
第二种情况,如果是上边不可取,制定RESETLOGS选项,此种情况是重置日志文件,内容将消失,属于不完整恢复
mount->执行创建控制文件脚本(注意是RESETLOGS选项)-〉recover database;-〉recover database using backup controlfile -〉auto;->recover database using backup controlfile until cancel;->alter database open resetlogs;
如果提示有坏块,打不开,使用隐藏参数,alter system set "_allow_resetlogs_corruption"=true scope=spfile 注意逻辑导出回复一个新的库