Wednesday, March 21, 2012

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
Check "ALTER DATABASE" in BOL.
Example:
use master
go
alter database northwind
set RESTRICTED_USER -- you can also use SINGLE_USER
with ROLLBACK IMMEDIATE
go
-- do db loading
...
go
alter database northwind
set MULTI_USER
go
AMB
"rshivaraman@.gmail.com" wrote:

> 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
>
|||You could try setting the database into SINGLE_USER or RESTRICTED_USER mode.
PS Please don't try to hijack a thread into comp.* heirarchy by setting the
follow-up to a single newsgroup. Not all of us post to a news server with
access to comp.*
A
<rshivaraman@.gmail.com> wrote in message
news:1184605005.617566.220470@.k79g2000hse.googlegr oups.com...
> 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
>
|||Hi Mesa and Bertrand :
Thanks a bunch for your replies. I am not sure you meant by replying,
i did post this question to 3 newsgroups and quite surprised, why your
answers didnt come up in those. I did click the followup button, but
didnt know what to do with it, so left it empty. From next time, will
not click the followup button
Thanks again
Apologize for any trouble
RS

No comments:

Post a Comment