se Buffers 134217728 bytes Redo Buffers 6103040 bytes Database mounted. Database opened.
3. pfile步骤: 修改pfile参数 一致性关闭数据库 增加或者减少控制文件 使用pfile启动数据库 验证结果。
修改控制文件: *.control_files='/u01/app/oracle/oradata/prod/disk1/control01.ctl','/u01/app/oracle/oradata/prod/disk2/control01.ctl','/u01/app/oracle/oradata/prod/disk3/control01.ctl','/u01/app/oracle/oradata/prod/disk4/control01.ctl','/u01/app/oracle/oradata/prod/disk5/control01.ctl'
关闭数据库:
SQL>shutdown immediate
copy文件: [oracle@master dbs]$cp /u01/app/oracle/oradata/prod/disk4/control01.ctl /u01/app/oracle/oradata/prod/disk5/control01.ctl
启动数据库:
SQL> startup ORACLE instance started.
Total System Global Area 418484224 bytes Fixed Size 1336932 bytes Variable Size 276826524 bytes Database Buffers 134217728 bytes Redo Buffers 6103040 bytes Database mounted. Database opened.
六.控制文件的恢复:(控制文件全丢了要重建控制文件)
1.有多个控制文件时,丢了其中一个控制文件的恢复.
解决:拷贝其他的控制文件到丢失的目录即可。
2.控制文件全部丢失, 但controlfile备份到trace文件中的情况:执行过alter database backup controlfile to trace;
解决:启动nomount状态,重建控制文件: noresetlogs 例:
①.启动数据库:报错
SQL> startupORACLE instance started.
Total System Global Area 418484224 bytes Fixed Size 1336932 bytes Variable Size 276826524 bytes Database Buffers 134217728 bytes Redo Buffers 6103040 bytes ORA-00205: error in identifying control file, check alert log for more info
②.查看告警日志:报错
ALTER DATABASE MOUNT ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/oradata/prod/disk3/control01.ctl' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/oradata/prod/disk2/control01.ctl' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/oradata/prod/disk1/control01.ctl' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 Mon Jun 16 15:16:04 2014 Checker run found 2 new persistent data failures ORA-205 signalled during: ALTER DATABASE MOUNT...
③.找trace 文件中的一句话(在trace 文件的最后),进行重建控制文件。
注意:这里的PROD是db_name . CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 2 MAXDATAFILES 30 MAXINSTANCES 1 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/prod/disk1/redo01.log', '/u01/app/oracle/oradata/prod/disk2/redo01.log' ) SIZE 100M BLOCKSIZE 512, GROUP 2 ( '/u01/app/oracle/oradata/prod/disk1/redo02.log', '/u01/app/oracle/oradata/prod/disk2/redo02.log' ) SIZE 100M BLOCKSIZE 512, GROUP 3 ( '/u01/app/oracle/oradata/prod/disk1/redo03.log', '/u01/app/oracle/oradata/prod/disk2/redo03.log' ) SIZE 100M BLOCKSIZE 512 -- STANDBY LOGFILE DATAFILE '/u01/app/oracle/oradata/prod/disk3/system01.dbf', '/u01/app/oracle/oradata/prod/disk3/sysaux01.dbf', '/u01/app/oracle/oradata/prod/disk3/undotbs01.dbf', '/u01/app/oracle/oradata/prod/disk3/users01.dbf' CHARACTER SET AL32UTF8 ;
在nomount执行上面的重建控制文件语句。
③.启动数据库到open状态,
SQL> alter database open;
Database altered.
查看表空间的信息
SQL> select tablespace_name ,contents from dba_tablespaces;
TABLESPACE_NAME CONTENTS ------------------------------ ----