469,129 Members | 1,720 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,129 developers. It's quick & easy.

make the database unavailable while loading it

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

Jul 16 '07 #1
1 2053
(rs*********@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, es****@sommarskog.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
Jul 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Motherchucker | last post: by
reply views Thread by Sunlight Software | last post: by
2 posts views Thread by Bob Flaminio | last post: by
4 posts views Thread by Ravi J | last post: by
reply views Thread by JackBlack | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.