Hi,
I'm searching the best way to find, in an Oracle trigger, from where come the DML order.
We are rewriting a big application (from Oracle Forms to .NET), and some code in trigger must not be called when the "client" is .NET.
I can use different Oracle user, and test it in triggers, but are they best solutions ?
Thank you !
How to know source of DML
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
You can assign the Client Id parameter in the connection string. Then you can check
and do not perform the trigger.
Code: Select all
sys_context('userenv', 'clientid') = "Your Client Id in your connection string"
Thank you Pinturiccio,
just a little correction, 'userenv' and 'client_identifier' have to be uppercase :
just a little correction, 'userenv' and 'client_identifier' have to be uppercase :
Code: Select all
if (sys_context('USERENV','CLIENT_IDENTIFIER') = 'blablabla') then
...