Solved

ORACLE ERROR ORA-09817 and ORA-09945

Posted on 2004-04-05
5
12,912 Views
Last Modified: 2012-06-27
Hi, I am having a problem:

ORA-09817: Write to audit file failed.
Linux Error: 28: No space left on device
ORA-09945: Unable to initialize the audit trail file
Linux Error: 28: No space left on device

It's apparent that the filesystem is full.  df shows that there is no space left.
what I would like to know is how to move the tablespace to another filesystem temporarily to clean up the filesystem
because I couldn't connect / as sysdba anymore

Thanks
0
Comment
Question by:markchih
5 Comments
 
LVL 12

Expert Comment

by:catchmeifuwant
Comment Utility
Which Oracle version are you using?

In 9i,try connecting as sys:

sqlplus /nolog
connect sys/change_on_install@<sid> as sysdba


where change_on_install is the default password..
0
 
LVL 8

Expert Comment

by:baonguyen1
Comment Utility
markchih, you have to move other files that are not Oracle files to a new location to release the space to solve the problem. Or you can delete/move the old archived log files if possible.

For your information Oracle always generate an audit (.aud) file when you connect INTERNAL, regardless of whether auditing has been turned on in the database and this is a security feature and expected behavior. So if the systemfile is full you will get trouble when trying to connect

Hope this helps
0
 
LVL 2

Accepted Solution

by:
GDE earned 500 total points
Comment Utility
!!! For first make full backup copy of your db !!!

If you lost password use orapwd to recreate password file. replace old, restart db.
Connect to oracle using new password as sysdba or internal.

Database is in ARCHIVELOG mode:
-------------------------------

1. Take the datafile offline with the "ALTER DATABASE DATAFILE '/old/location'  OFFLINE;" command.
2. Copy or move the datafile to its new location. On Unix this can be
   done with the "dd" command. Example:
      dd if=/old/location of=/new/location bs=4096
3. SVRMGR> ALTER DATABASE RENAME FILE '/old/location' TO '/new/location';
4. SVRMGR> RECOVER DATAFILE '/new/location';
5. SVRMGR> ALTER DATABASE DATAFILE '/new/location' ONLINE;

Database is in NOARCHIVELOG mode:
---------------------------------

1. Shutdown the database
2. Copy or move the datafile to its new location. On Unix this can be
   done with the "dd" command. Example:
      dd if=/old/location of=/new/location bs=4096
3. Start Server Manager and do a "STARTUP MOUNT"
4. ALTER DATABASE RENAME FILE '/old/location' TO '/new/location';
5. ALTER DATABASE OPEN;

then delete old file.
What a using in your DB you can see
select df.name "Path", ts.name "TableSpace name"
    from v_$datafile df, ts$ ts
    where ts.ts# = df.file#

Best regards
Dmitry
0
 
LVL 4

Expert Comment

by:andertst
Comment Utility
Your audit file destination is full.

"show parameter aud" will tell you where audit_file_dest is.

Using your operating sysdtem commands, delete most (or all) of your.aud files.
Or you can compress them into a zip or tar file.
Alternately add space if you don't want to do either of the above.

The first message (from catchmeifuwant) gives you instructions that should let you login to the database if your problem had been a full archive log destination.  Try logging in as a non-sysdba user as that won't require a .aud file.

HTH
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Creating and Managing Databases with phpMyAdmin in cPanel.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now