O/S-Error: (OS 21) in the Alert log

book

Article ID: 159507

calendar_today

Updated On:

Products

Data Loss Prevention Enforce

Issue/Introduction

This applies to Windows only:

The symptoms are: enforce fails to allow logins, DBA is unable to login to the database on the database server, even though the services may be up.

On investigation, the alertlog contains errors very similar to the following.

Errors in file c:\oracle\product\10.2.0\admin\protect\bdump\protect_dbw0_1936.trc:
ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
ORA-01110: data file 9: 'D:\ORADATA\PROTECT\USERS02.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 21)

Resolution

Errors in file c:\oracle\product\10.2.0\admin\protect\bdump\protect_dbw0_1936.trc:
ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
ORA-01110: data file 9: 'D:\ORADATA\PROTECT\USERS02.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 21)

This collection of errors basically state that a disk drive that used to be connected and operable, is, for whatever reason, no longer connected or functional.

Oracle throws the ORA-01110 error because it knows and expects that particular file to be present and available. 

The next two errors, ORA-27041 and OSD-04002 tell the same tale; "unable to open file".

Finally, the O/S-Error: (OS 21) is a Windows OS error stating that the "device is not ready"

This can be explained by removable media (USB drive!) or something gone wrong with the RAID array.  In the end, there is something wrong at the hardware level.

If the device can not be brought back from the dead, the database will need to be restored (elsewhere) from backup.