Skip to content

ORA-27037: Unable to Obtain File Status - OS File Errors

Error Text: ORA-27037: unable to obtain file status

ORA-27037 is raised when Oracle calls stat() on a file at the OS level and receives an error. The file may not exist, the user lacks permission to read its directory, or the underlying filesystem is unavailable. The error is typically accompanied by an OS-level error code (errno).

  • File deleted manually outside Oracle’s knowledge
  • Path typo in command or parameter
  • File on unmounted filesystem
  • Backup catalog references file that was cleaned up
  • Oracle OS user cannot stat the file
  • Directory permissions block traversal (no x permission)
  • SELinux blocking access
  • ACLs restricting Oracle user
  • NFS mount point unavailable
  • ASM diskgroup dismounted
  • Filesystem in read-only mode after I/O error
  • ACFS mount missing
  • Disk failure
  • SAN/storage path failure
  • Cable disconnection
-- The error usually accompanies file path in alert log
-- Look for ORA-27037 with filename
SELECT name FROM v$datafile;
SELECT name FROM v$controlfile;
SELECT member FROM v$logfile;
SELECT name FROM v$tempfile;
Terminal window
# Find associated OS error
ADR_BASE=$(adrci -script "show base" 2>/dev/null | head -1)
tail -200 $ADR_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace/alert_$ORACLE_SID.log \
| grep -A5 "ORA-27037"

Typical output:

ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Terminal window
# Test file existence
ls -la /u01/app/oracle/oradata/PROD/users01.dbf
# Check parent directory readability
ls -la /u01/app/oracle/oradata/PROD/
# Test as Oracle user
sudo -u oracle stat /u01/app/oracle/oradata/PROD/users01.dbf
# Check filesystem
df -h /u01
mount | grep u01
errnoMeaningLikely cause
2ENOENTFile doesn’t exist
13EACCESPermission denied
5EIOI/O error
20ENOTDIRPath component not a directory
116ESTALENFS stale handle
-- Take affected datafile offline
ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf' OFFLINE;
-- Restore via RMAN
RMAN> RESTORE DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf';
RMAN> RECOVER DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf';
-- Bring online
ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf' ONLINE;
Terminal window
# Verify Oracle user ownership
chown oracle:oinstall /u01/app/oracle/oradata/PROD/users01.dbf
chmod 640 /u01/app/oracle/oradata/PROD/users01.dbf
# Fix directory traversal
chmod 750 /u01/app/oracle/oradata/PROD
# Check parent path
namei -mo /u01/app/oracle/oradata/PROD/users01.dbf
Terminal window
# For NFS mount issues
umount /u01/oracle/data
mount -t nfs nfs-server:/export/oracle /u01/oracle/data
# Test
ls /u01/oracle/data
# For ASM
sqlplus / as sysasm
SQL> ALTER DISKGROUP data MOUNT;
RMAN TARGET /
-- Check for missing backup pieces
RMAN> CROSSCHECK BACKUP;
RMAN> CROSSCHECK ARCHIVELOG ALL;
-- Remove expired entries
RMAN> DELETE NOPROMPT EXPIRED BACKUP;
RMAN> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
-- Tempfiles can be recreated easily
ALTER TABLESPACE temp DROP TEMPFILE '/u01/oradata/PROD/temp01.dbf';
ALTER TABLESPACE temp ADD TEMPFILE '/u01/oradata/PROD/temp01.dbf'
SIZE 5G AUTOEXTEND ON NEXT 100M MAXSIZE 20G;

6. Recreate Missing Controlfile (Multiplexed)

Section titled “6. Recreate Missing Controlfile (Multiplexed)”
-- If one of multiple controlfiles missing
SHUTDOWN IMMEDIATE;
-- Copy good controlfile to missing location
host cp /u01/oradata/PROD/control01.ctl /u02/oradata/PROD/control02.ctl
STARTUP;
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RMAN-08120: warning: archived log not deleted, not yet applied by standby

Fix: Run CROSSCHECK ARCHIVELOG ALL; DELETE EXPIRED ARCHIVELOG ALL;

Scenario 2: Datafile Path Wrong After Restore

Section titled “Scenario 2: Datafile Path Wrong After Restore”
SQL> ALTER DATABASE OPEN;
ORA-01157: cannot identify/lock data file 5
ORA-27037: unable to obtain file status

Fix: Use ALTER DATABASE RENAME FILE to point to correct path.

SELECT * FROM v$datafile;
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 116: Stale file handle

Fix: Remount NFS share; consider dedicated/local storage for datafiles.

SQL> RECOVER DATABASE UNTIL CANCEL;
ORA-00279: change 12345 generated at 05/08/2026 14:30:00 needed
ORA-00289: suggestion : /u01/arch/PROD/1_42_1234567890.dbf
ORA-00280: change 12345 for thread 1 is in sequence #42
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u01/arch/PROD/1_42_1234567890.dbf
ORA-00308: cannot open archived log '/u01/arch/PROD/1_42_1234567890.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
[oracle@host]$ ls -la /u01/arch/PROD/
total 4096
-rw-r----- 1 oracle oinstall 50000000 May 8 14:25 1_41_1234567890.dbf
# Sequence 42 missing — restore from backup or apply tape archive
#!/bin/bash
# Verify Oracle file paths exist
DIRS="/u01/app/oracle/oradata/PROD /u01/arch/PROD /u02/fra/PROD"
for dir in $DIRS; do
if ! sudo -u oracle test -d "$dir"; then
echo "ALERT: $dir not accessible to oracle user"
fi
done
# Run weekly
RMAN> CROSSCHECK BACKUP;
RMAN> CROSSCHECK ARCHIVELOG ALL;
RMAN> CROSSCHECK COPY;
RMAN> DELETE NOPROMPT EXPIRED BACKUP;
RMAN> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
RMAN> DELETE NOPROMPT EXPIRED COPY;
  • Avoid manual file management on local filesystems
  • Use ASM for automatic file management
  • If using filesystem, enforce structured paths (oradata/$ORACLE_SID/$type)
  • Never mv, cp, or rm Oracle-managed files outside Oracle
  • Use ALTER DATABASE RENAME FILE for moves
  • Use RMAN BACKUP AS COPY for migrations
  • ORA-01110: Data file [N]: ‘filename’
  • ORA-01157: Cannot identify/lock data file
  • ORA-01565: Error in identifying file
  • ORA-19625: Error identifying file
  • ORA-27038: Created file already exists
  • ORA-27041: Unable to open file
  • Identify file path from error/alert log
  • Decode OS errno (2=missing, 13=permission, etc.)
  • Verify file exists at OS level
  • Check Oracle user can stat the file
  • Test parent directory readability
  • Verify filesystem mounted and healthy
  • Restore from backup if file genuinely lost
  • Run RMAN CROSSCHECK if error involves backup catalog