The process reference: https://blogs.oracle.com/Database4CN/entry/%E5%A6%82%E4%BD%95%E9%87%8D%E5%BB%BArac%E7%9A%84%E6%8E%A7% E5%88%b6%e6%96%87%e4%bb%b6problem Phenomenon:There's a school report. Login PL/SQL connection database is an error "Ora-12541:tns: No listener"; troubleshooting logs found Tue 25 14:46:58 2014
Thread 2 advanced to log sequence 18098 (LGWR switch)
Current log# 4 seq# 18098 mem# 0: +datadg/urpdb/onlinelog/group_4.266.821439273
Tue Nov 25 14:46:58 2014
Archived Log Entry 50394 added for thread 2 sequence 18097 ID 0xb0471722 dest 1:
Tue Nov 25 14:54:49 2014
Read from Controlfile member ' +datadg/urpdb/controlfile/current.260.821439141 ' have found a corrupted block (blk#, C F seq# 0)
Hex dump of (file 0, block) in Trace file/u01/app/oracle/diag/rdbms/urpdb/urpdb2/trace/urpdb2_lmon_10377.trc
Corrupt block relative dba:0x00000023 (file 0, block 35)
Completely Zero block found during control file block read
Hex dump of (file 0, block) in Trace file/u01/app/oracle/diag/rdbms/urpdb/urpdb2/trace/urpdb2_lmon_10377.trc
Corrupt block relative dba:0x00000023 (file 0, block 35)
Completely Zero block found during control file block read
Errors in FILE/U01/APP/ORACLE/DIAG/RDBMS/URPDB/URPDB2/TRACE/URPDB2_LMON_10377.TRC:
Ora-00202:control file: ' +datadg/urpdb/controlfile/current.260.821439141 '
Errors in File/u01/app/oracle/diag/rdbms/urpdb/urpdb2/trace/urpdb2_lmon_10377.trc (incident=15289):
Ora-00227:corrupt block detected in control file: (block, # blocks 1)
Ora-00202:control file: ' +datadg/urpdb/controlfile/current.260.821439141 '
Incident details in:/u01/app/oracle/diag/rdbms/urpdb/urpdb2/incident/incdir_15289/urpdb2_lmon_10377_i15289.trc
Tue Nov 25 14:54:51 2014
Dumping diagnostic data in directory=[cdmp_20141125145451], requested by (instance=2, osid=10377 (Lmon)), summary=[ INCIDENT=15289].
Errors in FILE/U01/APP/ORACLE/DIAG/RDBMS/URPDB/URPDB2/TRACE/URPDB2_LMON_10377.TRC:
Ora-00227:corrupt block detected in control file: (block, # blocks 1)
Ora-00202:control file: ' +datadg/urpdb/controlfile/current.260.821439141 '
Lmon (ospid:10377): Terminating the instance due to error 227
System State Dump requested by (instance=2, osid=10377 (Lmon)), summary=[abnormal instance termination].
System state dumped to trace FILE/U01/APP/ORACLE/DIAG/RDBMS/URPDB/URPDB2/TRACE/URPDB2_DIAG_10357.TRC
Instance terminated by Lmon, PID = 10377As can be seen from the log, the control file is corrupted, causing the DB instance to terminate.Workaround:Because the log files, data files are good, only a control file is corrupted, only through the reconstruction control file method to solve; Rebuilding a control file on a RAC has some minor differences from a single instance: You must set the Cluster_database=false before rebuilding the control file. And only one instance is launched to perform the operation, or an error is given.
Ora-01503:create Controlfile failed
Ora-12720:operation requires database is in EXCLUSIVE mode
After you rebuild the control file, you need to set Cluster_database to true again.Process steps:1. First generate a script to rebuild the control file:
sql> ALTER DATABASE backup Controlfile to trace; 2. The path and name of this file are detailed in the alert log of the database:
Tue Nov 25 22:32:04 2014
ALTER DATABASE backup Controlfile to trace
Backup controlfile written to trace file/u01/app/oracle/diag/rdbms/urpdb/urpdb1/trace/urpdb1_ora_6233.trc
Completed:alter database backup Controlfile to trace
3. Start an instance
sql> startup Nomount;
4. Modify the Cluster_database property sql> alter system set CLUSTER_DATABASE=FALSE Scope=spfile;
sql> shutdown Immediate
sql> startup Nomount; 5. Get the Create control file script from URPDB1_ORA_6233.TRC (noresetlogs) Execute sql> Create controlfile reuse DATABASE "urpdb" noresetlogs ARCHIVELOG
Maxlogfiles 192
Maxlogmembers 3
Maxdatafiles 1024
Maxinstances 32
Maxloghistory 18688
LOGFILE
GROUP 1 ' +datadg/urpdb/onlinelog/group_1.261.821439143 ' SIZE 50M BLOCKSIZE 512,
GROUP 2 ' +datadg/urpdb/onlinelog/group_2.262.821439143 ' SIZE 50M BLOCKSIZE 512,
GROUP 3 ' +datadg/urpdb/onlinelog/group_3.265.821439273 ' SIZE 50M BLOCKSIZE 512,
GROUP 4 ' +datadg/urpdb/onlinelog/group_4.266.821439273 ' SIZE 50M BLOCKSIZE 512
DataFile
' +datadg/urpdb/datafile/system.256.821439061 ',
' +datadg/urpdb/datafile/sysaux.257.821439061 ',
' +datadg/urpdb/datafile/undotbs1.258.821439061 ',
' +datadg/urpdb/datafile/users.259.821439061 ',
' +datadg/urpdb/datafile/undotbs2.264.821439205 ',
' +datadg/urpdb/datafile/tsp_imp_d.dbf ',
' +datadg/urpdb/datafile/tsp_dpstar.dbf ',
' +datadg/urpdb/datafile/ts_portal_d.dbf ',
' +datadg/urpdb/datafile/ts_w5_d.dbf ',
' +datadg/urpdb/datafile/ts_wap_d.dbf ',
' +datadg/urpdb/datafile/ts_oa_d.dbf ',
' +datadg/urpdb/datafile/tsp_sastar.dbf ',
' +DATADG/URPDB/DATAFILE/TSP_PORTAL.DBF '
CHARACTER SET Al32utf8
; 6. Confirm that the redo log,thread# is correct
Sql> select * from V$log; 7. Restore the database, start the database, restore the temporary files (These steps, written very clearly in Urpdb1_ora_6233.trc) sql> recover database;
Media recovery complete.
Sql> alter system archive log all;
sql> ALTER DATABASE open;
sql> ALTER tablespace TEMP ADD tempfile ' +datadg/urpdb/tempfile/temp.263.821439145 ' reuse;
sql> ALTER tablespace tsp_imp_temp ADD tempfile ' +datadg/urpdb/tempfile/tsp_imp_temp.dbf ' REUSE;
sql> ALTER tablespace tsp_dpstar_temp ADD tempfile ' +datadg/urpdb/tempfile/tsp_dpstar_temp.dbf ' REUSE;
sql> ALTER tablespace ts_portal_temp ADD tempfile ' +datadg/urpdb/datafile/ts_portal_temp.dbf ' REUSE;
sql> ALTER tablespace ts_w5_temp ADD tempfile ' +datadg/urpdb/datafile/ts_w5_temp.dbf ' reuse;
sql> ALTER tablespace ts_wap_temp ADD tempfile ' +datadg/urpdb/datafile/ts_wap_temp.dbf ' reuse;8. Restore Cluster_database Properties sql> alter system set CLUSTER_DATABASE=TRUE Scope=spfile;
sql> shutdown Immediate
9. Restart the Cluster service./crsctl start Cluser problem resolution. 10. Log in to another server to view the status of the database, if there is a problem with the appropriate processing.Summary:1. It is important to turn on automatic backup of database control files: This database can only be reconstructed by using the automatic backup function of the control file. If it is on, it is easier to use the control file for recover database using Backup Controlfile (pending test validation)
Control file corruption rebuild process under RAC environment