时间:2021-07-01 10:21:17 帮助过:39人阅读
alter databasebackup controfile to trace as
alter databasebackup controfile to trace as '/bk/col.sql';
一致性停库破坏日志文件和控制文件
启动数据库
SQL> startup
Oracle instancestarted.
Total SystemGlobal Area 314572800 bytes
Fixed Size 1219136 bytes
VariableSize 113247680 bytes
DatabaseBuffers 192937984 bytes
RedoBuffers 7168000 bytes
ORA-00205: errorin identifying control file, check alert log for more info
因为没有控制文件所以会出205错误
我们根据备份的控制文件信息重新创建控制文件
CREATECONTROLFILE REUSE DATABASE "ORCL2" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1'/u01/tiger/oradata/orcl2/redo01.log' SIZE 50M,
GROUP 2'/u01/tiger/oradata/orcl2/redo02.log' SIZE 50M,
GROUP 3'/u01/tiger/oradata/orcl2/redo03.log' SIZE 50M
DATAFILE
'/u01/tiger/oradata/orcl2/system01.dbf',
'/u01/tiger/oradata/orcl2/tiger.dbf',
'/u01/tiger/oradata/orcl2/sysaux01.dbf',
'/u01/tiger/oradata/orcl2/users01.dbf',
'/u01/tiger/oradata/orcl2/undotbs02.dbf',
'/u01/tiger/oradata/orcl2/undotbs01',
'/u01/tiger/oradata/orcl2/tiger01.dbf'
CHARACTER SETZHS16GBK
;
因为之前也没有了redo日志文件所以重启数据库的时候用resetlogs参数
alter databaseopen resetlogs
,