Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1009693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:58:04+00:00 2026-05-16T08:58:04+00:00

Is it possible to see the DML (SQL Statement) that is being run that

  • 0

Is it possible to see the DML (SQL Statement) that is being run that caused a trigger to be executed?

For example, inside an INSERT trigger I would like to get this:

“insert into myTable (name) values (‘Fred’)”

I read about ora_sql_txt(sql_text) in articles such as this but couldn’t get it working – not sure if that is even leading me down the right path?

We are using Oracle 10.

Thank you in advance.

=========================

[EDITED] MORE DETAIL: We have the need to replicate an existing database (DB1) into a classified database (DB2) that is not accessible via the network. I need to keep these databases in sync. This is a one-way sync from (DB1) to (DB2), since (DB2) will contain additional tables and data that is not contained in the (DB1) system.

I have to determine a way to sync these databases without bringing them down (say, for a backup and restore) because it needs to stay live. So I thought that if I can store the actual DML being run (when data changes), I could “play-back” the DML on the new database to update it, just like someone was hand-entering it back in.

I can’t bring over all the data because of the sheer size of it, and I can’t just copy over the changed records because of FK constraints and the order in which I insert/update records. I figured that if I could “play-back” a log of what happened, using the exact SQL that changed the master, I could keep the databases in sync.

My current plan of attack was to keep a log of all records that were changed, inserted, and deleted and when I want to sync, the system generates DML to insert/update/delete those records. Then I just take the .SQL file to the classified system and run the script. The problem I’m running into are FKs. (Because when I generate the DML I only know what the current state of the data is, not it’s path to get there – so ordering of statements is an issue). I guess I could disable all FK’s, do the merge, then re-enable all FK’s…

So – does my approach of storing the actual DML as-it-happens suck pondwater, or is there a better solution???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:58:05+00:00Added an answer on May 16, 2026 at 8:58 am

    That function only works for ‘event’ triggers as discussed here.
    You should look into Fine-Grained Auditing as a mechanism for this. Details here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 497k
  • Answers 497k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can have you your controller observe the UIApplicationWillEnterForeground notification.… May 16, 2026 at 12:06 pm
  • Editorial Team
    Editorial Team added an answer Flashrom can use FT2232 SPI mode: http://flashrom.org/Downloads May 16, 2026 at 12:06 pm
  • Editorial Team
    Editorial Team added an answer No, that won't work. There is also no way to… May 16, 2026 at 12:06 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Would it be possible to see the CallStack in VBA for MS Access 2003?
Is it possible to see when a record has been inserted in a SQL
Is it possible to see the history of changes to a particular line of
Is it possible to see the return value of a method after the line
Is it possible to see the numeric value of an NSNumber in the debugger
Is it possible to see which constructor was the generic one? internal class Foo<T>
Is it possible to see definition of Q_SIGNALS, Q_SLOT, SLOT(), SIGNAL() macros in Qt
Normally, I'd choose List<String> [or, in VB, List(Of String) ] over StringCollection whenever possible:
Edit: I know that method 1 is essentially invalid and will probably use method
Possible Duplicate: Is there a printf converter to print in binary format? Consider this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.