Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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.

asked 09 Dec '13, 19:50

Tuan%20Dinh's gravatar image

Tuan Dinh
61224
accept rate: 0%


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:)

permanent link

answered 10 Dec '13, 03:43

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

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

permanent link

answered 10 Dec '13, 07:23

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×41

question asked: 09 Dec '13, 19:50

question was seen: 2,311 times

last updated: 10 Dec '13, 07:23