Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    5

    Unanswered: Log of All SQL statements against the database !

    Friends,

    Is there a way using which we can log all the sql statements issued against the database?


    Thanks in Advance
    Magesh

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Set sql_trace=true in init.ora file.

    -- to activate tracing:
    alter system (or session) set sql_trace = true;


    -- Or use audit
    Set audit_trail=true in init.ora file.
    -- to activate audit:
    audit <audit options> ...etc...

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Apr 2003
    Location
    Minneapolis, MN
    Posts
    273
    Quote Originally Posted by apmagesh2004
    Friends,

    Is there a way using which we can log all the sql statements issued against the database?


    Thanks in Advance
    Magesh
    In addition to what LKBrwn_DBA has suggested, There is one more way to perform the same...(Not suggested because of extra overhaed)

    you can set CREATE_STORED_OUTLINE to true on SYSTEM level. Which crauses all compiled SQL statements to be stored in the DBA_OUTLINES view.

    In 9i (only SELECT statemetns) and 10G and Up, you can also make use of DBMS_fga to audit SELECT, INSERT, UPDATE, DELETE statemets on perticuler table/object/column.
    Bhavin

    MS Computer Science
    OCP DBA 9i/8i

Posting Permissions

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