Performing User-Managed Database-18.5、Restoring Control Files
18.5、Restoring Control Files
18.5.1、Restore Lost Copy of a Multiplexed Control File
18.5.1.1、Copying a Multiplexed Control File to a Nondefault Location
假设丢失控制文件的磁盘和文件系统不能再关联,那么必须修改CONTROL_FILES初始化参数来表明丢失的控制文件的新位置。
(1)数据库读或写控制文件直接shutdown
(2)拷贝正确的控制文件到指定的位置
(3)修改CONTROL_FILES初始化参数
(4)启动,mount,open数据库
模拟1、某块磁盘介质失败,丢失了控制文件,把控制文件放到一个新的位置
(1)
SQL> select status from v$instance;
STATUS
------------
OPEN
$ rm -rf control01.ctl
SQL> alter system checkpoint;
SQL> select dbid,name,log_mode,checkpoint_change# from v$database;
DBID NAME LOG_MODE CHECKPOINT_CHANGE#
---------- ---------------------------------------- ------------ ------------------
1375601832 BOSS ARCHIVELOG 577511
SQL>
alter tablespace testtbs01
add datafile ‘/oracle/oradata/boss/testtbs01_02.dbf‘ size 10m;
SQL> show parameter control_files;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string /oracle/oradata/boss/control01
.ctl, /oracle/oradata/boss/con
trol02.ctl, /oracle/oradata/bo
ss/control03.ctl
SQL> shutdown immediate;
SQL> startup open;
ORA-00205: error in identifying control file, check alert log for more info
$ cd $ORACLE_BASE/admin/boss/bdump
$ vi alert_boss.log
Wed Jun 4 16:11:38 2014
starting up 1 dispatcher(s) for network address ‘(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))‘...
MMNL started with pid=12, OS id=17321
Wed Jun 4 16:11:38 2014
starting up 1 shared server(s) ...
Wed Jun 4 16:11:39 2014
ALTER DATABASE MOUNT
Wed Jun 4 16:11:39 2014
ORA-00202: control file: ‘/oracle/oradata/boss/control01.ctl‘
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Wed Jun 4 16:11:42 2014
ORA-205 signalled during: ALTER DATABASE MOUNT...
(2)
$ cp -rf /oracle/oradata/boss/control02.ctl /oradata/boss/control01.ctl
(3)
SQL> create pfile from spfile;
$ cd $ORACLE_HOME/dbs
$ vi initboss.ora
*.control_files=‘/oradata/boss/control01.ctl‘,‘/oracle/oradata/boss/control02.ctl‘,‘/oracle/oradata/boss/control03.ctl‘
(4)
SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance
SQL> shutdown immediate;
SQL> create spfile from pfile;
SQL> startup open;
SQL> select status from v$instance;
STATUS
------------
OPEN
Performing User-Managed Database-18.5、Restoring Control Files,古老的榕树,5-wow.com
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。