Oracle在控制文件丢失的情况下,有时我们只能重建控制文件,具体语法例如:
CREATE CONTROLFILE REUSE DATABASE "SQUAN" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/opt/oracle/oradata/squan/redo01.log' SIZE 50M,
GROUP 3 '/opt/oracle/oradata/squan/redo03.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/opt/oracle/oradata/squan/system01.dbf',
'/opt/oracle/oradata/squan/undotbs01.dbf',
'/opt/oracle/oradata/squan/sysaux01.dbf',
'/opt/oracle/oradata/squan/users01.dbf',
'/opt/oracle/oradata/squan/test01.dbf',
'/opt/oracle/oradata/squan/test02.dbf'
CHARACTER SET ZHS16GBK;
注意:上面语句datafile里没有temp表空间,数据库恢复完成之后需要重建临时表空间
alter tablespace temp add tempfile '/opt/oracle/oradata/squan/temp01.dbf' size 30m reuse;
create temporary tablespace temp tempfile '/opt/oracle/oradata/squan/temp01.dbf' size 30m
阅读(297) | 评论(0) | 转发(0) |