|
Posted by Erland Sommarskog on 02/23/07 22:54
blueboy (matt_meech@hotmail.com) writes:
> here is the info
>
> Executed as user: User domainname\user. Exclusive access could not be
> obtained because the database is in use. [SQLSTATE 42000] (Error
> 3101) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
> (Error 3013). The step failed.
>
> Step one runs fine which disconnects users so not sure what the prob
> is? any ideas??
Seems like you set the database for that job step to be the database
you want to restore. Change to master, and you should be fine.
Or someone manages to sneak in betnween the job steps. Make it one
single step to avoid this risk.
(But put SET MULTI_USER in step 2, and on the Advanced tab for step 1,
configure the job to continue with step 2, even if step 1 fails.)
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|