You are here: Re: make the database unavailable while loading it « MsSQL Server « IT news, forums, messages
Re: make the database unavailable while loading it

Posted by Erland Sommarskog on 07/16/07 22:16

(rshivaraman@gmail.com) writes:
> I need to make my database unavailable when i am loading the db. This
> happens daily and the db is not connected to any online app, to make
> the app unavailable. It is queried thru an Access and hence available
> all the time.
> The load happens daily for an hour in the morning.
> Is there anyway to make it inaccessible to users while loading data
> and then make it accessible

The process that runs the load could issue ALTER DATABASE SET SINGLE_USER
when it starts and ALTER DATABASE SET MULTI_USER when it's done. You may
be interested in adding WITH ROLLBACK IMMEDIATE to the single-user command.

See Books Online for details.


--
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]


Удаленная работа для программистов  •  Как заработать на 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

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