Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Question Unanswered: Sql Capture Help

    Hi,
    We are using Oracle 10g. We are looking for a way to capture sql generated whenever we update the oracle tables using toad or pl/sql developer etc. For example if I insert anything into a table using the toad gui, i want some query that capture's that insert or update statements. I know their is some kind of merge statement that gets generated, but dont now how to capture it.


    Any help would be great.

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I know their is some kind of merge statement that gets generated, but dont now how to capture it.
    Your imagination is running wild.

    What you want can be done using AUDIT; which is a lot a work to set up.
    What you desire can be done with DBMS_LOGMNR; but it requires ongoing manual intervention.

    Depending upon actual requirements Change Data Capture might be part of solution.
    Last edited by anacedent; 03-28-10 at 23:53.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by anacedent View Post
    >What you want can be done using AUDIT; which is a lot a work to set up.
    I don't think AUDIT will log a MERGE statement as separate INSERT and UPDATE statements. It will simply log the MERGE ...

  4. #4
    Join Date
    Mar 2010
    Posts
    2
    Basically our requirments is if we change some tables be adding some new values etc in development, we want to capture the sql automatically or by running some query so we dont have to write those insert, update statments each time. We can simply run the query and get the statments and move it to Test envrionment..

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >We can simply run the query and get the statments and move it to Test envrionment..
    Put DDL & DML in SQL script files so they can be invoked where ever & when ever desired.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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