ORA-00211: control file does not match previous control files
ORA-00202: control file: '/data/oracle/flash_recovery_area/orcl/control02.ctl'
#我的oracle安装路径是/data下
引起原因:
文件/data/oracle/flash_recovery_area/orcl/control02.ctl已损坏。
处理方法:
#删除该文件(请根据报错信息自行更改路径)rm -rf /data/oracle/flash_recovery_area/dg/control02.ctl
#控制文件是搭建OracleDataguard的时候就建立好的,一般在数据库路径oradata+实例名下请根据情况自行更改,实在找不到可用find命令查找。cp /data/oracle/oradata/dg/control02.ctl /data/oracle/flash_recovery_area/dg
重新启动数据库:
SQL> alter database mount standby database;
alter database mount standby database
*
ERROR at line 1:
ORA-01103: database name 'ORCL' in control file is not 'DG'
SQL> alter system set db_name='orcl' scope=spfile; #如果有上面情况说明实例名不一致,请切换
System altered.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 977076224 bytes
Fixed Size 2219312 bytes
Variable Size 578814672 bytes
Database Buffers 390070272 bytes
Redo Buffers 5971968 bytes
SQL> alter database mount standby database;
Database altered.
说明:如果还是报错请重新从主服务器上拷贝生成的控制文件。