Skip to Main Content
  • Questions
  • database corrupted - ORA-09925: Unable to create audit trail file

Breadcrumb

May 4th

Question and Answer

Chris Saxon

Thanks for the question, swathi.

Asked: July 20, 2016 - 7:16 pm UTC

Last updated: July 22, 2016 - 7:31 am UTC

Version: 11G

Viewed 10K+ times! This question is

You Asked

Actually when my database is running at that time I change my parameter file.after changing I shutdown my database.And again I tried to connect to my database as sysdba. But I cannnot connect to that database.It shows some errors.
Then what is the solution for me.How can I connect to the original database.


Actually I want to perform auditing on my database.For that in my parameter file I removed the comment tag(#) from two parameters audit_trail and audit_file_dest.After that I shutdown my database.Again I tried to startup.It shows [ ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on]
above error but I gave correct destination.
After that again I commented those two parameters audit_trail and audit_file_dest in parameter file and tried to startup db.
But again it shows same error
[ ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
ORA-01075: you are currently logged on]
After commented those parameters then also I'm unable to connect.
Then what is the problem and what is the solution for me.


and Chris said...

Are you sure the destination exists and you can write to it?

MOS note 69642.1 has the following instructions for dealing with this issue:

If you are prompted for a password and then receive error ORA-09925 "Unable
    to create audit trail file" or error ORA-09817 "write to audit file failed",
    along with "SVR4 Error: 28: No space left on device", do the following: 

    Check your "pfile". It is typically in the "$ORACLE_HOME/dbs" directory
    and will be named "init<your_sid>.ora, where "<your_sid>" is the value of
    "ORACLE_SID" in your environment. If the "init<your_sid>.ora" file has
    the "ifile" parameter set, you will also have to check the included file
    as well. You are looking for the parameter "audit_file_dest". 

    Alternatively retreive the parameter by typing: show parameter audit_file_dest .
 
    If "audit_file_dest" is set, change to that directory; otherwise change to
    the default directory , from version 10.2 onwards the first default value 
    for parameter AUDIT_FILE_DEST is: $ORACLE_BASE/admin/$ORACLE_SID/adump, 
    the second default value for the directory is: $ORACLE_HOME/rdbms/audit 
    (this is the only default directory for pre 10.2 RDBMS versions). 
 
    Make sure that if the first default directory exists, that it is also writable,
    otherwise if this directory exist but is not writable, an error 
    ORA-09925  "Unable to create audit trail file" is raised.

    If not any of the default directories exist, then create one. Ensure that you have
    enough space to create the audit file. The audit file is generally 600 bytes 
    in size. If it does exist, verify you can write to the directory:
 
    % touch afile 
 
    If it could not create the called "afile", you need to change the permissions
    on your audit directory: 
 
    % chmod 751  


You can also find further instructions in MOS note 1993887.1.

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, July 21, 2016 - 2:45 pm UTC


Or, the directory is full...

John, July 21, 2016 - 6:29 pm UTC

I've just had precisely this issue. It was caused by the audit folder filling (I found nearly 70,000 files in it).

I manually deleted the dross and then set up a crontab to automatically delete obsolete audit files.

The fact that this is supposed to be auditing my activities is apparently of no significance to my employer. The poacher being the game keeper feels a bit weird.

Sadly it shows all too clearly just how pointless audit often is - nobody ever looks at the logs - sigh.
Chris Saxon
July 22, 2016 - 7:31 am UTC

Presumably as they only just tried enabling auditing it isn't. But it's worth checking.

The poacher being the game keeper feels a bit weird.

Haha, yes! Sadly it's often only after someone intentionally does something nasty that people become interested. By which time it's too late...