ORA-27037: Unable to Obtain File Status - OS File Errors
ORA-27037: Unable to Obtain File Status
Section titled “ORA-27037: Unable to Obtain File Status”Error Overview
Section titled “Error Overview”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).
Common Causes
Section titled “Common Causes”File Does Not Exist
Section titled “File Does Not Exist”- 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
Permission Issues
Section titled “Permission Issues”- Oracle OS user cannot stat the file
- Directory permissions block traversal (no
xpermission) - SELinux blocking access
- ACLs restricting Oracle user
Filesystem Problems
Section titled “Filesystem Problems”- NFS mount point unavailable
- ASM diskgroup dismounted
- Filesystem in read-only mode after I/O error
- ACFS mount missing
Hardware/Storage
Section titled “Hardware/Storage”- Disk failure
- SAN/storage path failure
- Cable disconnection
Diagnostic Steps
Section titled “Diagnostic Steps”Identify Affected File
Section titled “Identify Affected File”-- The error usually accompanies file path in alert log-- Look for ORA-27037 with filenameSELECT name FROM v$datafile;SELECT name FROM v$controlfile;SELECT member FROM v$logfile;SELECT name FROM v$tempfile;Check Alert Log
Section titled “Check Alert Log”# Find associated OS errorADR_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 statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3Verify File at OS Level
Section titled “Verify File at OS Level”# Test file existencels -la /u01/app/oracle/oradata/PROD/users01.dbf
# Check parent directory readabilityls -la /u01/app/oracle/oradata/PROD/
# Test as Oracle usersudo -u oracle stat /u01/app/oracle/oradata/PROD/users01.dbf
# Check filesystemdf -h /u01mount | grep u01Common errno Mappings
Section titled “Common errno Mappings”| errno | Meaning | Likely cause |
|---|---|---|
| 2 | ENOENT | File doesn’t exist |
| 13 | EACCES | Permission denied |
| 5 | EIO | I/O error |
| 20 | ENOTDIR | Path component not a directory |
| 116 | ESTALE | NFS stale handle |
Resolution Steps
Section titled “Resolution Steps”1. Restore Missing File from Backup
Section titled “1. Restore Missing File from Backup”-- Take affected datafile offlineALTER DATABASE DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf' OFFLINE;
-- Restore via RMANRMAN> RESTORE DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf';RMAN> RECOVER DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf';
-- Bring onlineALTER DATABASE DATAFILE '/u01/app/oracle/oradata/PROD/users01.dbf' ONLINE;2. Fix Permissions
Section titled “2. Fix Permissions”# Verify Oracle user ownershipchown oracle:oinstall /u01/app/oracle/oradata/PROD/users01.dbfchmod 640 /u01/app/oracle/oradata/PROD/users01.dbf
# Fix directory traversalchmod 750 /u01/app/oracle/oradata/PROD
# Check parent pathnamei -mo /u01/app/oracle/oradata/PROD/users01.dbf3. Remount Filesystem
Section titled “3. Remount Filesystem”# For NFS mount issuesumount /u01/oracle/datamount -t nfs nfs-server:/export/oracle /u01/oracle/data
# Testls /u01/oracle/data
# For ASMsqlplus / as sysasmSQL> ALTER DISKGROUP data MOUNT;4. Cleanup Stale Backup Catalog
Section titled “4. Cleanup Stale Backup Catalog”RMAN TARGET /
-- Check for missing backup piecesRMAN> CROSSCHECK BACKUP;RMAN> CROSSCHECK ARCHIVELOG ALL;
-- Remove expired entriesRMAN> DELETE NOPROMPT EXPIRED BACKUP;RMAN> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;5. Recreate Missing Tempfile
Section titled “5. Recreate Missing Tempfile”-- Tempfiles can be recreated easilyALTER 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 missingSHUTDOWN IMMEDIATE;
-- Copy good controlfile to missing locationhost cp /u01/oradata/PROD/control01.ctl /u02/oradata/PROD/control02.ctl
STARTUP;Common Scenarios
Section titled “Common Scenarios”Scenario 1: RMAN Backup Cleanup
Section titled “Scenario 1: RMAN Backup Cleanup”ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3RMAN-08120: warning: archived log not deleted, not yet applied by standbyFix: 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 5ORA-27037: unable to obtain file statusFix: Use ALTER DATABASE RENAME FILE to point to correct path.
Scenario 3: NFS Disconnect
Section titled “Scenario 3: NFS Disconnect”SELECT * FROM v$datafile;ORA-27037: unable to obtain file statusLinux-x86_64 Error: 116: Stale file handleFix: Remount NFS share; consider dedicated/local storage for datafiles.
Sample Output
Section titled “Sample Output”SQL> RECOVER DATABASE UNTIL CANCEL;ORA-00279: change 12345 generated at 05/08/2026 14:30:00 neededORA-00289: suggestion : /u01/arch/PROD/1_42_1234567890.dbfORA-00280: change 12345 for thread 1 is in sequence #42
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}/u01/arch/PROD/1_42_1234567890.dbfORA-00308: cannot open archived log '/u01/arch/PROD/1_42_1234567890.dbf'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional 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 archivePrevention Strategies
Section titled “Prevention Strategies”Filesystem Monitoring
Section titled “Filesystem Monitoring”#!/bin/bash# Verify Oracle file paths existDIRS="/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" fidoneBackup Catalog Hygiene
Section titled “Backup Catalog Hygiene”# Run weeklyRMAN> 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;Use ASM or Standardized Paths
Section titled “Use ASM or Standardized Paths”- Avoid manual file management on local filesystems
- Use ASM for automatic file management
- If using filesystem, enforce structured paths (
oradata/$ORACLE_SID/$type)
Avoid OS-Level File Manipulation
Section titled “Avoid OS-Level File Manipulation”- Never
mv,cp, orrmOracle-managed files outside Oracle - Use
ALTER DATABASE RENAME FILEfor moves - Use
RMAN BACKUP AS COPYfor migrations
Related Errors
Section titled “Related Errors”- 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
Troubleshooting Checklist
Section titled “Troubleshooting Checklist”- 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