Detecting Commits

Detecting Commits

Post by Matthew MacFarlan » Wed, 07 Oct 1998 04:00:00



Hello everyone,

Does anybody know a way to detect when users transactions get commited?  I
need to build an audit table with a USER and DATE record for each commit
that takes place in order to debug an application.

Thanks,

Matthew MacFarland
Dril-Quip, Inc.

PS-Sorry for reposting so soon.  I lost my cached messages.

 
 
 

Detecting Commits

Post by Steve Hayne » Wed, 07 Oct 1998 04:00:00




Quote:>Does anybody know a way to detect when users transactions get commited?  I
>need to build an audit table with a USER and DATE record for each commit
>that takes place in order to debug an application.

This is a very strange thing to want to do.
I suspect you would have to write a commit_it() procedure
and insert into my_audit_record(user,date) yourself.
Obviously replacing existing commits with a call to your
new commit_it() procedure.
Strange, OK I give in, why do you want to do this?
Steve
--
Please remove nospam from my address to Reply.

 
 
 

Detecting Commits

Post by Matthew MacFarlan » Thu, 08 Oct 1998 04:00:00


Hello Steve,

I have since solved the problem by other means.  I was trying to deterimine
that time that rows got commited versus the time that the insert statement
was processed.

Thanks,

Matthew




>>Does anybody know a way to detect when users transactions get commited?  I
>>need to build an audit table with a USER and DATE record for each commit
>>that takes place in order to debug an application.

>This is a very strange thing to want to do.
>I suspect you would have to write a commit_it() procedure
>and insert into my_audit_record(user,date) yourself.
>Obviously replacing existing commits with a call to your
>new commit_it() procedure.
>Strange, OK I give in, why do you want to do this?
>Steve
>--
>Please remove nospam from my address to Reply.

 
 
 

1. detecting clients commit by external (pro*c) program ?

Hi,

I need to react upon a clients commit. The code that I control is in a
db-trigger that inserts a special request-record. The request-record has to
be processed by a separate process but I want it to start as soon as
possible, preferrably in something like a 'after commit database trigger'.
How do I know when the client committed, other than polling some status in
a table ?

What I tried is:
1) dbms_alert -> Nice, the signal is delivered at commit time but ... since
more clients signal the same event and take there time before even try to
commit, the hole system gets locked.

2) dbms_pipe -> I get the data but still don't know about the commit.

3) a combination -> a dbms_pipe where a unique event-id is passed to a
separate pro*c program. That program alerts another server with a
'register' alert and commits. That other server registers the received
event-id and performs a waitany again. I used dbms_pipes to acknoledge
receipt of the messages. The client just calls passes key info to the
seperate server through a dbms_pipe. It should work but it does not.

aix 3.2, oracle 7.3, pro*c 2.2.2

I would appriciate any tip/help/comment that could eventually help me out.
Please, also reply in email.

Thanks in advance,

Ronald

---------------------------------------------------------------------------

http://www.worldaccess.nl/~ronr (last update: march 6, 1997)

2. Error converting data type varchar to numeric - why?

3. Set number of records to commit in commit transaction

4. Access 2.0/Crystal Reports 4.0 - Can't Open Database Error

5. Oracle commits vs Sybase/SQL-Server commits

6. Help Me)Strange DataReport Problem

7. Problem: SQL Anywhere commit doesn't commit

8. Server Logs

9. When does COMMIT not commit?

10. Detect if Cursor Opened and Detect if Cursor Allocated

11. How to detect the database lock while Begin/Commit Trans.

12. Handling Multiple Selects. (To commit or not to commit)

13. How can't I detect if a record set is not alterable? / Detect Record Locking