SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Offboarding Users
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

LOOKUP_BI
Constraint Violating Yak Guru

295 Posts

Posted - 06/12/2012 :  15:50:56  Show Profile  Reply with Quote
How do you handle offboarding of users from SQL when they leave the company?

We currently don't have a script or mechanism in place to take care of this therefore it is done manually, going through each SQL Server Instance. We don't have that many SQL Server Instances...but what if you do ?

There should be a better way of doing this. Can everyone share how this is being done in your organization, or if there is a script in place to do this. I might be able to use it as a starting point to come up with a solution.

If this post is in the incorrect section, kindly relocate it. I was not sure where this question should fall.

robvolk
Most Valuable Yak

USA
15559 Posts

Posted - 06/12/2012 :  16:14:17  Show Profile  Visit robvolk's Homepage  Reply with Quote
As much as possible you should use Active Directory Groups and apply database permissions only to those groups. That way when a person leaves the company they simply have to be removed as a user, which deletes them from the groups, and consequently their SQL access.

If you have to use SQL authentication, you should have separate SQL logins for each person and their permissions should be managed via database roles. Users should not have permissions granted to them directly, it should only be done via role membership. If they leave you simple need to remove the user from the role and drop the SQL login.
Go to Top of Page

LOOKUP_BI
Constraint Violating Yak Guru

295 Posts

Posted - 06/13/2012 :  09:22:01  Show Profile  Reply with Quote
Totally agree with you, thats how it should be. But its not the way here. Users ( QA/Developers) are assigned to different database's based on their projects. Not everyone with the same role has access to same database with same level of permissions. Also there is 'authority' problem between the windows admin team and the rest of the IT team.

In simple words its a mess..... Thats the reason I was looking for a way to easily script out these users when offboarding happens.
Go to Top of Page

robvolk
Most Valuable Yak

USA
15559 Posts

Posted - 06/13/2012 :  09:26:07  Show Profile  Visit robvolk's Homepage  Reply with Quote
If you match SQL logins to their Windows login, you can query AD and get all users then match that against your SQL logins. I've done this before using the DSQUERY and DSGET utilities under Windows 2003. It's also available in Windows 2008 and higher if you install the Active Directory feature. You can also try setting up a linked server to Active Directory, but it's complicated and quirky. Log Parser might be easier:

http://mlichtenberg.wordpress.com/2011/02/03/log-parser-rocks-more-than-50-examples/
http://technet.microsoft.com/en-us/scriptcenter/dd919274.aspx
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000