1.查看位置以及name是否正确
SQL> sho parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl lock_name_space string log_file_name_convert string service_names string orcl SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string +DG1/orcl/controlfile/current. 261.851893233, +DG1/orcl/contr olfile/current.260.851893233
2.关闭数据库,关闭数据库之前一定做好备份哦
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
3.启动数据库到mount状态
SQL> startup mount ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2084296 bytes Variable Size 385876536 bytes Database Buffers 1207959552 bytes Redo Buffers 14692352 bytes Database mounted.
4.备份一个新的control file,并修改control file的位置
SQL> alter database backup controlfile to '+DG1/orcl/controlfile/controlfile03'; Database altered. SQL> alter system set control_files='+DG1/orcl/controlfile/current.261.851893233','+DG1/orcl/controlfile/controlfile03' scope=spfile; System altered.
5.关闭数据库,再启动,再检查
SQL> shutdown immediate ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2084296 bytes Variable Size 385876536 bytes Database Buffers 1207959552 bytes Redo Buffers 14692352 bytes Database mounted. Database opened. SQL> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl lock_name_space string log_file_name_convert string service_names string orcl SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string +DG1/orcl/controlfile/current. 261.851893233, +DG1/orcl/contr olfile/controlfile03