DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Audit to file

  1. #1
    Join Date
    Feb 2002
    Posts
    41

    Question

    Is it possible to audit SQL statements (including that of triggers) in a way that they are written to a text file?

    I've enabled Audit Trail in DB mode but don't have the slightest idea on where to get the executed statements.

    TIA

  2. #2
    Join Date
    May 2002
    Location
    California, USA
    Posts
    175

    Cool

    Arda,

    AUDIT_TRAIL=DB enables systemwide auditing where audited records are written to the database audit trail, the SYS.AUD$ table

    AUDIT_TRAIL=OS enables systemwide auditing where audited records are written to the operating system's audit trail

    AUDIT_TRAIL=NONE disables auditing. This is the default value.

    If you have set AUDIT_TRAIL = OS, modify the "init.ora" file to specify the destination for the audited records using the AUDIT_FILE_DEST parameter.

    To get the auditing information from SYS.AUD$ spool the info you need to text file.

    Hope that helps,

    --clio_usa
    Senior Oracle DBA

    Visit the latest Oracle DBA forums:
    http://www.dbaclick.com/cgi-bin/ib3/ikonboard.cgi
    ---------------------------------------------------------

  3. #3
    Join Date
    Feb 2002
    Posts
    41

    Thumbs up

    Thanks Pal.

  4. #4
    Join Date
    Feb 2002
    Posts
    41

    Question

    Clio,

    AUDIT_FILE_DEST is a 9i parameter, isn't it?

    8i reports it as an "unknown parameter". Is there a workaround??

    QUOTE
    --------
    spool the info you need
    --------

    What would that info be (i.e: which records should I select from SYS.AUD$) in order to retrieve the SQL statements ?

    TIA

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by Arda
    Clio,

    AUDIT_FILE_DEST is a 9i parameter, isn't it?
    No, it's available in 8i.
    8i reports it as an "unknown parameter". Is there a workaround??
    You should specify the OS you are using. I assume you are using NT/2000, as AUDIT_FILE_DEST is realy not supported on that platform. In NT/2000 OS audit trail is allways written to the system's EventLog, you can't redirect it to another file.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  6. #6
    Join Date
    Feb 2002
    Posts
    41

    Lightbulb

    I see. In fact it IS Nt.

    Thanks.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width