Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
David92595
Starting Member
8 Posts |
Posted - 2012-12-20 : 14:54:20
|
Basics: I'm running a SQL Server 2008 R2I am trying to run a SQL job or maintenance plan on the startup (restart) of a SQL Server.I’m trying to automate a Database Shrink job, which has to have exclusive access to the database to run. Realistically, the only time this happens is when the server is restarted, so I’m looking for a way to run a job on restart.As always, any help is greatly appreciatedThank you,David92595 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-12-20 : 16:34:27
|
Cross postinghttp://social.msdn.microsoft.com/Forums/en/transactsql/thread/78af1c31-4ef1-4518-a40e-4e5477d6f67b |
|
|
ovc
Starting Member
35 Posts |
Posted - 2013-01-02 : 17:07:12
|
why would you plan such a horrible job and not use an alternative?Is the transaction log or the database files themselves to big?If you want exclusive access to one database you can try to usealter database set single_user (with rollback immediate) |
|
|
|
|
|