Showing posts with label prevent. Show all posts
Showing posts with label prevent. Show all posts

Friday, March 23, 2012

Lock database to update

Hi,

I need to lock a database (prevent users from connecting) in order to
update it. I already know how to kick everyone out with their spid but
i can't figure how to prevent them from reconnecting.

Thanks !Set the datbase in single user mode, so no one can reconnect.

ALTER DATABASE myDB SET SINGLE_USER WITH ROLLBACK Immediate
Markus|||It works, thanks a lot !|||It works, thanks a lot !|||Kittikun (kittikun@.gmail.com) writes:
> It works, thanks a lot !

And when you are done

ALTER DATABASE db SET MULTI_USER

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Thats good point Erland

Madhivanansql

Friday, March 9, 2012

local system question

If I remove builtin\administrators will this prevent local system from being
a potential startup account?
TIA,
John"John Brown" <anonymous@.discussions.microsoft.com> wrote in message
news:670DC55B-F707-41AF-9B1F-18B6DCEDFA89@.microsoft.com...
> If I remove builtin\administrators will this prevent local system from
being a potential startup account?
No
Steve|||Well I don't know if this is the same problem but it may be a clue. I recen
tly ran into trouble with an access front end on a workstation that suddenly
wouldn't connect to the server. It wouldn't connect using the server name
nor would the name show up
in the drop down list. As it turns out it was a hijack virus that two diffe
rent scanners didn't detect. It took control of that machine as it tried to
connect to the server using the name of the server. So I just used the ip
of the server to connect an
d it works. So it may be a virus.|||John,
It doesn't but if your SQL Servers are clustered then you will need to make
sure the cluster account can still access SQL Server. It usually does so by
using the BUILTIN\Administrators logon. There is also a problem with Search
Service:
FIX: Microsoft Search Service May Cause 100% CPU Usage if BUILTIN\Administra
tors Login Is Removed
http://support.microsoft.com/defaul...034&Product=sql
INF: How to impede Windows NT administrators from administering a clustered
instance of SQL Server
http://support.microsoft.com/defaul...712&Product=sql
There are probably a few more KB articles I don't remember.
Randy Dyess
www.Database-Security.Info