Unix Technical Forum

How to synch renamed NT account with SQL Server 2005

This is a discussion on How to synch renamed NT account with SQL Server 2005 within the SQL Server forums, part of the Microsoft SQL Server category; --> We have NT accounts with access to our SQL Server 2005 database. Infrastructure are going to rename the NT ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-12-2008, 05:22 PM
Jules
 
Posts: n/a
Default How to synch renamed NT account with SQL Server 2005

We have NT accounts with access to our SQL Server 2005 database.

Infrastructure are going to rename the NT Accounts and I need to
secure a *no impact* scenario for our users. I'm reading here about
SIDs and syslogins but not 100% up on this area.


What is the best way to update / synch the NT account names within
SQL
Server?


Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-12-2008, 05:23 PM
Erland Sommarskog
 
Posts: n/a
Default Re: How to synch renamed NT account with SQL Server 2005

Jules (jules.farrell@james-chapman.co.uk) writes:
> We have NT accounts with access to our SQL Server 2005 database.
>
> Infrastructure are going to rename the NT Accounts and I need to
> secure a *no impact* scenario for our users. I'm reading here about
> SIDs and syslogins but not 100% up on this area.
>
>
> What is the best way to update / synch the NT account names within SQL
> Server?


Get new and old names into a mapping table. Then run:

SELECT 'ALTER LOGIN ' + quotename(oldname) + ' WITH NAME = ' +
quotename(newname)
FROM tbl

Copy, paste and run result. If the SID also changes, this too can be
addressed with ALTER LOGIN.

If you need to put this in a script, you can run a cursor over the
the result set and then EXEC() each row.


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

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads for: How to synch renamed NT account with SQL Server 2005

Thread Thread Starter Forum Replies Last Post
renamed root account, how2 recover Werner Mohren Sun Managers 1 06-29-2008 10:59 AM
SQL 2005: Renamed 'sa' account Bill E. SQL Server 2 04-10-2008 05:52 AM
Error I don't understand, losing synch with server Scott Ribe Pgsql General 2 04-09-2008 10:54 AM
Re: Error I don't understand, losing synch with server Scott Ribe Pgsql General 0 04-09-2008 09:48 AM
Re: Synch file with Unison on remote server Douglas Allan Tutty Debian Linux Users forum 0 01-27-2008 06:36 AM


All times are GMT. The time now is 06:02 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com