Monday, January 4, 2016

ORA-00221: error on write to controlfile

Reason of this error (and probably instance crash) is that some other process has locked the controlfile and oracle process is not able to get hold of a lock on the controlfile before it could write in it. Most probable reason for this is some third party backup solution that might be copying oracle related files in backup process and hence holding a lock while copying.
ORA-00221: error on write to controlfile
ORA-00206: error in writing (block 3, # blocks 1) of controlfile
ORA-00202: controlfile: 'C:\ORACLE\ORADATA\MYDB\CONTROL02.CTL'
ORA-27072: skgfdisp: I/O error
OSD-04008: WriteFile() failure, unable to write to file
O/S-Error: (OS 33) The process cannot access the file because another process has locked a portion of the file.


To avoid this, you should exclude oracle files (control files, datafiles, redo log files) from the backup by any third party tool. These Oracle related files should be backed up through some oracle’s recommended backup tool, like RMAN.

Same can also happen if datafiles are locked by some backup tool. For datafiles, you may see ORA-01186, ORA-01122, ORA-01110, ORA-01208


No comments:

Post a Comment