Groups | Blog | Home
all groups > sql server dts > march 2007 >

sql server dts : How to set up command to run when the database is brought online?


PIEBALD
3/27/2007 7:03:46 PM
I'd like to be able to execute an SQL command automatically when the database
is brought online (or attached or the server starts).

I assume it'll require DTS, but I don't even know what to ask for in Help.

stephanie
3/28/2007 12:00:02 AM
If the sql agent service starts automatically, I suggest to create a job in
sql agent with schedule 'Start automatically when SQL server Agent starts'


[quoted text, click to view]
Allan Mitchell
3/28/2007 5:50:29 AM
Hello PIEBALD,

This question is probably better suited to the .Server newsgroup.

To do it on server start means you will need to link a dependency to the
start up of the SQL Server service.

To do it when bringing the DB online could be done when you execute the statement
to bring it online (not through the UI)


--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button