When your Database contains a How would you fix the database to come up again. I have seen that -gf is implemented to disable triggers. Is there somthing like -xyz to disable events from the command line ? Think of the posibilities. Implement a bogus DatabaseStart event and when you bring up your server 3 Month later it is blocked. And you did not try to start you backup database ;-) asked 25 Feb '10, 12:06 Thomas Dueme... |
You should have a safety belt in place when you are working with the DatabaseStart Event. Enclose the risky part of your event in a if clause that checks the Name of your server instance.
So when your database is not starting up correctly you can start the server with a special Name to avoid execution of the event
Then you are able to drop or fix the DatabaseStart Event answered 18 Mar '10, 10:51 Thomas Dueme... Excellent idea! It just went into the Foxhound to do list. Even easier to add code without indenting: IF ... = 'SafetyBelt" THEN RETURN Comment Text Removed
2
Although it is a good idea, it doesn't help the user with the situation they are actually in. "Hello, 911? Yeah, I've shot myself in my foot." "Oh, I see. Next time you should wear safety boots. Thanks for calling." :) |
Contact tech support -- suppressing events can be done. -john. answered 16 Mar '10, 13:54 John Smirnios Sooooo... I'm guessing (hoping?) you regard it on the same level as recovering the DBA password; i.e., not something to be done lightly. As the creator of a commercial embedded database, the DatabaseStart event is definitely something I don't want bypassed. But... if someone has a DBA password, then IMO they should have the ability. More or less, yes. I think adding the ability to disable the events in the field if you provide the dba password (directly on the command line or with an option to prompt for it) might be a good one. |
Seems like a deadlock situation...Do you know what exactly crashes the server? May it be possible to connect VERY FAST to the database and drop the event connection or use a somewhat blocking query that could block event execution?
Just to add: Breck has requested an option to disallow connections while DatabaseStart is running, c.f. news://forums.sybase.com:119/iapgv2t5e0ti7of4bbdqcpe7bovhugr8cg@4ax.com. Now imagine you had chosen that option, too :(
Excellent question! FWIW Foxhound actually contains a STOP ENGINE statement in the DatabaseStart event that (gosh, I hope!) only gets executed under certain specific circumstances :)
After I read http://sqlanywhere.blogspot.com/2008/02/defragmenting-temporary-file.html I played with my development environment. If I remember correctly I had a
CALL xp_cmdshell( 'NOWHERE_TO_FIND.EXE')
in that event.