1.打开数据库报错:
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 6145
Session ID: 191 Serial number: 77
ERROR: slave communication error with ASM; terminating process 8363
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_8363.trc:
解决办法:错误的原因是控制文件中redo是ASM磁盘管理的,resetlogs会尝试去创建这些redo,但目的库时普通文件管理的,所以报了错误,这个时候需要重建控制文件,改redo由ASM管理到普通文件管理.
SQL> alter database backup controlfile to trace;
Database altered.
CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/orcl/redo1.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/u01/app/oracle/oradata/orcl/redo2.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/u01/app/oracle/oradata/orcl/redo3.log' SIZE 50M BLOCKSIZE 512,
GROUP 4 '/u01/app/oracle/oradata/orcl/redo4.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/u01/app/oracle/oradata/orcl/system.dbf',
'/u01/app/oracle/oradata/orcl/sysaux.dbf',
'/u01/app/oracle/oradata/orcl/undotbs1.dbf',
'/u01/app/oracle/oradata/orcl/users.dbf',
'/u01/app/oracle/oradata/orcl/undotbs2.dbf'
CHARACTER SET ZHS16GBK
2.再次打开数据库报错:
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled
ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 5 '/u01/redo05.log' SIZE 200M REUSE,
GROUP 6 '/u01/redo06.log' SIZE 200M REUSE,
GROUP 7 '/u01/redo07.log' SIZE 200M REUSE,
GROUP 8 '/u01/redo08.log' SIZE 200M REUSE;
SQL> alter database disable thread 2;
Database altered.
SQL> alter database drop logfile group 5;
Database altered.
SQL> alter database drop logfile group 6;
Database altered.
SQL> alter database drop logfile group 7;
Database altered.
SQL> alter database drop logfile group 8;
Database altered.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/redo4.log
/u01/app/oracle/oradata/orcl/redo3.log
/u01/app/oracle/oradata/orcl/redo2.log
/u01/app/oracle/oradata/orcl/redo1.log
SQL>