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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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! |
| ||||
| 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 |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| 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 |