Troubleshooting ORA-19504 : failed to create file: Easy Guide

ORA-19504 : failed to create file
Today in this article, we will learn about how to resolve ORA-19504 : failed to create file. Lets go through this:

Error :

 DEST_ID DEST_NAME    	STATUS    DB_UNIQUE_NAME      ERROR
---------- ------------------------------ --------- -----------------
1 LOG_ARCHIVE_DEST_1 VALID NONE
2 LOG_ARCHIVE_DEST_2 ERROR testsby ORA-19502: write error on file "", block number (block size=)

Cause :

In most of the cases, this may happen due to the File system space or Disk group space getting filled up.

Solution :

If this is an archive destination, then check the archive dests, if the FRA gets full, then clear the FRA space, otherwise you can change the archive destination for some time temporarily. Or if it is in the ASM disk group, then you will get an error in the alert log also as below:

ORA-19504: failed to create file "+RECO"

ORA-17502: ksfdcre:4 Failed to create file +RECO

ORA-15041: diskgroup "RECO" space exhausted

So, clear older archives by rman policy

delete archivelog all completed before 'sysdate-no. of days';
Ex : delete archivelog all completed before 'sysdate-4';

Or, you have to go to the disks group through asmcmd, delete older archives manually, and then enable the dest again. It will be fine. Hope this helps!!

ASMCMD [+RECO/teststby/ARCHIVELOG] > ls
2024_07_11/
2024_07_12/
2024_07_13/
2024_07_14/

ASMCMD [+RECO/teststby/ARCHIVELOG] > rm -rf 2024_07_11

Enable the Dest Now:
alter system set LOG_ARCHIVE_DEST_state_2='ENABLE';
select DEST_ID,DEST_NAME,STATUS,DB_UNIQUE_NAME,ERROR from gv$archive_dest where status!='INACTIVE';

DEST_ID DEST_NAME STATUS DB_UNIQUE_NAME ERROR
---------- ------------------------------ --------- ------------
1 LOG_ARCHIVE_DEST_1 VALID NONE
2 LOG_ARCHIVE_DEST_2 VALID testsby

Sometimes, it may occur due to permission issue also, for this you will get ORA-19504: failed to create file – SVR4 Error: 13: Permission denied then you may fix the permission as below :

 chmod g+w <disk_name>

Also, you can get more information on this from the Oracle Doc too.

This Post Has One Comment

Leave a Reply