Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Script to disable users

Author  Topic 

astrosky
Starting Member

1 Post

Posted - 2009-07-15 : 12:09:40
I have very little to no knowledge of SQL. Sorry. We have a db that we copy from live to test. When we do this all users are active in test db. We only want about 4 users to be active in the test db. Can someone give me a sample of a script I can run that would disable the users I do not want to have access to the test db. I have no idea what the commands would be, but should be able to figure it out from a smaple.

IE - sql disable user1, user2, user3

Thanks for helping out a wet behind the ears newbie.

Mike

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-07-15 : 12:39:46
Those Users won't be able to connect unless you map the databases user to Logins to match SID. Just Map 4 users to Logins.
Go to Top of Page
   

- Advertisement -