dbTalk Databases Forums  

make the database unavailable while loading it

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss make the database unavailable while loading it in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
rshivaraman@gmail.com
 
Posts: n/a

Default make the database unavailable while loading it - 07-16-2007 , 11:56 AM






Hi All:

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

Thank you
RS


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: make the database unavailable while loading it - 07-16-2007 , 05:16 PM






(rshivaraman (AT) gmail (DOT) com) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.