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

Thread: Audit Database Shutdown/Startup

  1. #1
    Join Date
    Jun 2002
    Location
    Longmont, Colorado
    Posts
    174

    Audit Database Shutdown/Startup

    I'm trying to capture audit information for when the database is shutdown and started. I know that the information I'm looking for are captured in the audit tables or files if I have auditing enabled.

    BUT I'm doing something where I need it store it in my own table in the database.

    So I've using before shutdown and after startup triggers.

    My main question is this: I'm trying to capture the username that has issued the shutdown command. In the trigger's pl/sql, "user" will normal hold this information, but I realized that when you are logged in as SYSDBA, then "user" no longer holds your username, rather it is set to "SYS". If you use SYSOPER, then "user" is set to "PUBLIC".

    Is there any other variables, like "user", in pl/sql that hold other session information - perhaps "OS User", "Machine Name", etc.??

  2. #2
    Join Date
    Jun 2002
    Location
    Longmont, Colorado
    Posts
    174
    I guess to get right to the point...
    How can get my session's serial# and sid?
    If I can get this information, then I can use it to get other info from v$session.

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    get sid from v$mystat or use userenv()

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