Reply to Re: Restore SQL DB with correct logical file names

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация