on 2019 Jan 14 8:27 AM
Hello, all
I have a logging system, which works with triggers. It registers changes to fields writes them to a separate logging table. Now I have a new requirement to identify all changes, which occurred inside the same transaction. Is there a way to find out transaction id from the "after update" trigger code?
Thank you
Arcady
Request clarification before answering.
Would sa_transactions( ) procedure be helpful here or is it time-consuming?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, thanks for the pointer - I wasn't aware of that procedure's column transaction_id!
Can't tell on the performance but the following query could give the desired result (note, that this can generally return NULL but it should return a value within a trigger...):
select transaction_id from sa_transactions() where connection_num = connection_property('Number');
Nevertheless, as these transaction_ids are volatile, I don't know whether they are useful for later diagnostics... I (wildly) guess that should at least include transaction log offsets...
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.