on 11-19-2020 8:07 PM
How can I disable an update trigger on an object during a session. I need to bulk update large number of rows and disable the update trigger execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mark, working perfectly well.
I was missing the role on command.
Hmmm, "set triggers" isn't in the ASE command reference. Tricksy (but cool). I wish I'd known this a long time ago.
Also, it looks like bulkcopy writes do not fire triggers. See:
Utility Guide - Data Integrity for Defaults, Rules, and Triggers
which says:
"bcp, to enable its maximum speed for loading data, does not fire rules and triggers"
So I think the whole question is moot.
Ben
Re: set triggers is also mentioned in Rob's purple book ... you DO have a copy of that ... right? Right? RIGHT?
Of course I do, but.... it's at work and I haven't been in since the start of the apocalypse 😉
Re: OP mentions performing a bulk update and wanting to disable the update trigger ... so no bcp involved
Ah, you are quite correct. I bow in humble apology for missing this 😉
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.