SQL statement audit in 8i

Hi,
Is there any way to audit that when a particular sql statement was executed against a table, e.g somebody ran an update statement on employee table.
Regards

http://www.mscd.edu/~ittsdba/oradoc817/server.817/a76956/audit.htm

Similar Messages

  • How to find SQL Statement fired using SYS.AUD$ - Database Auditing

    Dear Friends
    I am having Oracle 9i Database and have configured it with database auditing option by setting the following parameter in init.ora file
    AUDIT_TRAIL = "DB"
    I want to audit SELECT, INSERT , UPDATE and DELETE operations on PRACTICE.EMP table for which I did :
    1) Logged in as SYS
    2) SQL> AUDIT SELECT, INSERT, UPDATE, DELETE
    ON PRACTICE.EMP
    BY ACCESS
    WHENEVER SUCCESSFUL;
    Audit Succedded
    Now how should I find out the SQL statement that does the insert, update or delete operation on the EMP table using SYS.AUD$ table
    Thanks

    Hi,
    It's contents can be viewed directly or via the following views:
    * DBA_AUDIT_EXISTS
    * DBA_AUDIT_OBJECT
    * DBA_AUDIT_SESSION
    * DBA_AUDIT_STATEMENT
    * DBA_AUDIT_TRAIL
    * DBA_OBJ_AUDIT_OPTS
    * DBA_PRIV_AUDIT_OPTS
    * DBA_STMT_AUDIT_OPTS
    The audit trail contains a lot of data, but the following are most likely to be of interest:
    * Username : Oracle Username.
    * Terminal : Machine that the user performed the action from.
    * Timestamp : When the action occured.
    * Object Owner : The owner of the object that was interacted with.
    * Object Name : The name of the object that was interacted with.
    * Action Name : The action that occured against the object. (INSERT, UPDATE, DELETE, SELECT, EXECUTE)
    So, take a look at action_name column from DBA_AUDIT_TRAIL view.
    Cheers
    Legatti

  • How to find SQL statement = Database Auditing

    Dear All
    I have configured Database Auditing on Oracle 9i Enterprise Edition Server
    parameter init.ora file:
    AUDIT_TRAIL = "DB"
    I want to audit INSERT,UPDATE, DELETE STATEMENT on PRACTICE.EMP table
    for which i did :
    1) Logged in as SYS
    SQL> AUDIT INSERT,UPDATE,DELETE
    ON PRACTICE.EMP
    BY ACCESS
    WHENEVER SUCCESSFUL
    Audit Succedded
    2) Now I have to check the SQL statement that did insert update or delete operation using SYS.AUD$
    3) There is SQLTEXT field , datatype is CLOB.
    How should I check the SQL Statements that were fired on PRACTICE.EMP table
    Kindly help

    SQL> show user
    USER is "SYS"
    SQL> alter system set audit_trail = db,extended scope=spfile;
    alter system set audit_trail = db,extended scope=spfile
    ERROR at line 1:
    ORA-32001: write to SPFILE requested but no SPFILE specified at startup
    I have init.ora but no spifle so should I create SPFILE based on INIT.ORA and then give the command ?
    As of now I am using V$SQL view to find all the commands executed on my database.
    I found one good book "Oracle Security" OREILY PUBLICATION in which Auditing Database is discussed in good details.
    Thank you so much for all your efforts

  • How to audit alter user sql statements in Oracle 11g.

    I want to audit all the alter user sql statements that show who is altered with what sql stment including the connections performed by sys and system.
    Ex: If I use the command : alter user xxx quota 50 GB on users;
    Then how can i grab this sql stement and who performed it with the timings.

    Pl post OS and database versions.
    What have you learned from the documentation ?
    http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_4007.htm#SQLRF01107
    http://download.oracle.com/docs/cd/E11882_01/network.112/e16543/guidelines.htm#DBSEG508
    What have you tried to implement so far ?
    HTH
    Srini

  • In audit few statemntns SQL statements is not populating

    Hi,
    I enable audit,for few (SELECT,CREATE TABLE)statements audit not populating sqltext in sys.aud$.But i can see few more SELECT&CREATE TABLE activityit populates SQLTEXT.
    if it not populates sql text ,what ll be the reason behind this?

    Thank you for quick reply, Joe!
    Yes, I meant the second option with '%' symbols but still I get incorrect results. Seems that OpenSQL layer ignores the 'NOT LIKE' criterias. Any other ideas?
    I'm pasting you the log I have with the JPQL and the prepared SQL queries
    <query jpql="select distinct e, e.time.srvrStrInitTime from SlAutoGeneral e where e.status not like :status order by e.time.srvrStrInitTime desc ">
        <executeQuery>
            <prepare sql="SELECT DISTINCT E.ID E_ID_id,E.STATUS E_STATUS_status,E.SYNTH_SUBJECT E_SYNTH_SUBJECT_synthSubject,
              ALIAS_1.SRVR_STR_INIT_TIME DISPLAY_2
              FROM SL_AUTO_TIME ALIAS_1, SL_AUTO_GENERAL E WHERE ALIAS_1.ID = E.ID AND E.STATUS NOT LIKE ? ORDER BY DISPLAY_2 DESC"/>
    Best regards,
    Martin

  • How could I investigate SQL statement from standard audit record ?

    We use Oracle 11gR2.
    We use standard audit , audit_trail=DB.
    We found suspicious audit record but that  SQL_BIND,SQL_TEXT colums were NULL.
    How could I investigate that SQL statement from standard audit record ?

    Only "DB, EXTENDED" would cause the SQL statement to be captured.
    If you have the Diagnostics Pack licence you could try querying DBA_HIST_SQLTEXT (joined to DBA_HIST_SNAPSHOT) -- but this would only list SQLs captured by AWR (i.e. the "Top 'N'" SQLs in that snapshot).
    Hemant K Chitale

  • How to examine the generated SQL statement in Receiver JDBC Adapter

    I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
    The only suggestion is to use RWB, but I was unable to find any details about how to do so.
    Any help is appreciated

    Hi,
    To add, u can see the SQL Statements in Audit log of RWB.
    Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
    Regards,
    Sudharshan
    Message was edited by:
            Sudharshan Aravamudan

  • SQL Statement on JDBC Adapter

    Hi all,
    how can I see the SQL Statement which is made by the JDBC Adapter.
    I have createt the XML Structure, but I want to know how PI (7.11) transformed the XML to SQL.
    How can I trace the JDBC Adapter? Which configuration is neccessary? Where can I find the trace?
    Thanks very much for your help!
    Jürgen

    Hi,
    this is my Auditlog
    Audit-Protokoll für Message: caded0e4-b287-1def-92a9-907432c01001
    Zeitstempel Typ Beschreibung
    2010-04-16 13:38:02 Information The message was successfully received by the messaging system. Protocol: XI URL: http://serv3709:52800/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    2010-04-16 13:38:02 Information Using connection JDBC_http://sap.com/xi/XI/System. Trying to put the message into the request queue.
    2010-04-16 13:38:02 Information Message successfully put into the queue.
    2010-04-16 13:38:02 Information The message was successfully retrieved from the request queue.
    2010-04-16 13:38:02 Information The message status was set to DLNG.
    2010-04-16 13:38:02 Information Delivering to channel: test_etl
    2010-04-16 13:38:02 Information JDBC Adapter Receiver processing started, required QoS BestEffort
    2010-04-16 13:38:02 Information JDBC Adapter Receiver Channel test_etl:  processing started; party   / service E_DWH.
    2010-04-16 13:38:02 Information IS_RUN.MAP_SYS_LADELAUF_START.MAIN
    2010-04-16 13:38:02 Information Database request processed successfully.
    2010-04-16 13:38:02 Information The message was successfully delivered to the application using connection JDBC_http://sap.com/xi/XI/System.
    2010-04-16 13:38:02 Information The message status was set to DLVD.

  • JDBC Receiver: exact SQL statement

    Hi,
    I'm in an IDoc-JDBC scenario, using XML-SQL messages to feed a JDBC Receiver and I am getting <i>weird messages</i> returned by Oracle.
    Question: is there a way to log/trace/audit <b>the exact SQL statement</b> that my channel is sending to Oracle??
    Thanks.
    Alex

    hi Alessandro,
    try: logSQLStatement
    from SAP note: 801367
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Jdbc adapter log sql statement to file

    Hi,
    I'm using a Proxy to Jdbc scenario.
    In the Adapter Configuration the logSQLStatement is set to true.
    Is it possible to log the sql statement shown in the Audit  to a file?
    Regards Ralf

    Hi
    please try the below query in Update sql statement
    update table_name set fieldname = systimestamp where .....
    or
    update table_name set fieldname = current_timestamp where .....
    Regards
    Ramg.

  • Help to sum up insert/update/delete statements audit options in 9.2 .

    Hi,
    I'm considering what audit options Oracle 9.2.0.8 Enterprice Edition got for dml statements.
    So far I know:
    - there is no dml text stored except for sysdba/sysoper users via audit_sys_operations
    -audit insert , delete,update gets only who/when no acctual sql_text available
    -FGA is only usable for SELECTS but with CBO enabled or false possitives possible
    only solution is:
    -create trigger on every application table which will do audit via autonomous transaction and some homegrown code
    -create after logon trigger which makes trace like 10046
    -sniff network traffic between DB and hosts and use intelligent software to extract sql statements
    Did I miss something obvious here ?
    Regards.
    Greg

    LogMiner...
    Though you don't want to run that on continuous basis.
    Sybrand Bakker
    Senior Oracle DBA

  • SQL statement/ DB Object beling call in last 1 Hour

    Hi,
    Can anyone help me i.e. How to find specific sql statement or database objects being used in last one hr or 24 hrs in Oracle 10.2.0.4?
    Thanks

    Hello,
    To find out specific SQL statement you can used following query  and to find information about object you need to enable object level auditing like select,update,insert and delete.
    SELECT e.SID,
    SUBSTR(osuser,0,7) osuser,
    SUBSTR(username,0,8) username,
    substr(status,1,1) status,
    SUBSTR(machine,0,11) machine,
    TO_CHAR(ROUND(value/1024),9999) || ' KB' memory,
    TO_CHAR((sysdate-logon_time)*24*60,999999.99) minutes,
    q.sql_text
    FROM
    v$session e,
    v$sesstat s,
    v$statname n,
    v$sql q
    WHERE s.statistic# = n.statistic#
    AND n.name = 'session uga memory max'
    AND e.sid = s.sid
    AND q.hash_value(+) = e.sql_hash_value
    order by
    machine,minutes;
    Hope this help.

  • Tracking SQL statements executed

    Hi,
    After obtaining a connection to my Oracle 10g database using JDBC, I would like to know if there is a way to track all SQL statements executed since the connection was made.
    This must be pretty easy, I'm just stumped.
    Thank you
    Tom

    Hi, and it's not that easy. The driver certainly doesn't
    keep track of what's been done, but look at the documentation
    regarding the logging the driver can be configured to do. It can
    print out everything it does, so some level of detail and degree,
    and that can be collected in a file and examined externally.
    That can be voluminous too... It might be more (or just as)
    practical to examine the DBMS-side session-auditing/logging
    features the DBMS may have to collect everything the session
    has done.
    HTH,
    Joe Weinstein at BEA Systems

  • Keep log sql statement

    Dear all,
    Is there any ways to keep log sql statement after insert,update,delete as the example below :
    ==========================================
    user01     client01     prog01.exe     update emp set name='test';
    user02     client02     prog02.exe     delete from emp1;
    I 'm not sure.Can use trigger? Is anybody have the example code?
    Oracle9i + windows2000
    Thank you for advance
    Chara

    Hi,
    Here is a small resumen About Basic Auditing in Oracle.
    For any Oracle versions prior to 9i you will need to set audit_trail parameter in the pfile ie.g.:
    audit_trail = DBFor later Oracle Versions:
    SQL>alter system set audit_trail = DB;To enable auditing for a specific object run the following command:
    SQL>AUDIT SELECT, INSERT, UPDATE, DELETE ON SCHEMA.TABLE;To stop auditing use:
    SQL>NOAUDIT SELECT, INSERT, UPDATE, DELETE ON SCHEMA.TABLE;Or to audit any statement that queries, delete, insert or updates any table, issue the following statement:
    SQL>AUDIT SELECT TABLE, DELETE TABLE, INSERT TABLE, UPDATE TABLE;If you want to audit a specific user will need to run the following commands:
    SQL>AUDIT ALTER TABLE, SELECT TABLE, INSERT TABLE, … ,GRANT PROCEDURE by <USERNAME>;To stop the audit for the user you will need to run:
    SQL>NOAUDIT ALTER TABLE, SELECT TABLE, INSERT TABLE, … ,GRANT PROCEDURE by <USERNAME>;To see the results of the auditing use please run:
    SQL> select * from dba_audit_trail;This is an excellent Oracle documentation to learn how to implement it:
    - http://download-uk.oracle.com/docs/cd/B19306_01/network.102/b14266/cfgaudit.htm
    Also I’ll recommend you to take a look on the following links:
    - http://www.oracle-base.com/articles/8i/Auditing.php
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • How to query and revoke Statements Auditing (11g and higher)

    HI,
    When I choose the OS/XML Standard Auditing:
    1) Which views allow me to see what statement auditing have been created?
    For instance: audit all on scott.emp by access.
    2) How to revoke a statement auditing like: audit all on scott by access?
    Thanks and Regards.

    I don't understand... have you tried it?
    07:14:57 SQL> select * from user_obj_audit_opts;
    no rows selected
    Elapsed: 00:00:00.03
    07:14:58 SQL> audit all on junk by access;
    Audit succeeded.
    Elapsed: 00:00:00.03
    07:15:12 SQL> select * from user_obj_audit_opts;
    OBJECT_NAME                    OBJECT_TYPE             ALT       AUD       COM       DEL       GRA       IND       INS       LOC       REN       SEL       UPD       REF EXE       CRE       REA
    WRI       FBK
    JUNK                           TABLE                   A/A       A/A       A/A       A/A       A/A       A/A       A/A       A/A       A/A       A/A       A/A       -/- -/-       -/-       -/-
    -/-       A/A
    1 row selected.
    Elapsed: 00:00:00.12
    07:16:46 SQL> noaudit all on junk;
    Noaudit succeeded.
    Elapsed: 00:00:00.03
    07:16:56 SQL> select * from user_obj_audit_opts;
    no rows selected
    Elapsed: 00:00:00.02
    07:17:03 SQL>
    'ALL' is a shortcut for naming all of the relevant options: ALTER, SELECT, DELETE, etc.

Maybe you are looking for

  • BAdI for CRMD_ORDER data validation

    Hi, I'm trying to do an enhacement over crmd_order, so when the user puts a date into "Requested Delivery Date" (Shipping Tab) this date automatically copies into "Pricing Date" field (Prices Tab). So I need a way of detect when the user changes the

  • Mobile sales online installation for CRM5.0(ABAP+JAVA)

    Hi , Client wanted to implement Mobile sales online for NW2004s component CRM5.0(ABAPJAVA) stack. We have already installed CRM5.0 with ABAPJAVA engine and EP7.0.Currently we are using EP with CRM5 using PCUIscreens. Also configured SSO(SAP logon tic

  • Directory structure on Win/MSS

    Hello, It is a conceptual doubt, not an error. We have several Dialog instances (on separate boxes) for our Production system running R/3 4.7 on Win server 2003 + MS SQL 8.00.2040 I noticed that directory structure of Dialog hosts don't have SYS dire

  • Abap ques

    1.What is the difference Between Role and Profile? 2.What is the process of dialog program from first to last? 3.How can one use Bar codes in Sap-script? 4.Answer the following set of questions a)     What is MANUE field in NAST table? b)     What is

  • Phoroshop Always Crashes after Liquify Filter

    Hello, I use Photoshop CC 14.2.1 (x64) for windows. I have Intel Core i7, 8 GB RAM with 2 GB NVIDIA graphic card (GT 630M). I usually get a lot of body slimming requests from my clients and I use Liquify filter a lot. But after using Photoshop CC, wh