cancel
Showing results for 
Search instead for 
Did you mean: 

Disable all db event when starting up db engine

Former Member
2,567

Is there way to disable all db events when running a db engine? I like to start an engine with a database to validate and would not like any events to be run.

Accepted Solutions (0)

Answers (2)

Answers (2)

VolkerBarth
Contributor

I don't think there's a builtin facility to do so, cf. this (older) thread:

How to avoid execution of DatabaseStart Event

What we have done to disable events for databases that are non running in "normal mode":

  • When starting the database, run a script with some ALTER EVENT statements to disable the according events
  • Modify the event handlers to check for some configuration (say, the name of the database engine or the database or the machine name) and to behave accordingly (say, to skip the event's code or to choose a different backup location for production and test environments... - a worthwhile difference:))

Obviously one could combine both methods in a DatabaseStart event that would automatically prevent events when not running in the "normal environment".


If you are about to suggest a command line parameter to skip all event execution, I guess I'd second that:)

MCMartin
Participant
0 Kudos

You could start the database read only, so that the events cannot change it, if this is what you would like to prevent: Use command line parameter -r