Changing Login Names

  • Our NT admins recently changed network logins from name based to employee number based. What is the best way to modify SQL logins to match.

  • Does your company also has active directory?  You could query active directory, add the new login for all of your existing login and then write a script to switch them over.  I think it could be done.  Sorry I don't have any script because I don't have to do any of this stuff at this moment.

     

    mom

  • There isn't a good way that I know of. You could script out the logins and permissions from EM, then do a search and replace. Not sure if there's a good automated way to do it. Perhaps the network guys have a matchup list.

  • You may find sp_help_revlogin useful. I have used it when migrating a database, to help transfer the relevant logins *and* passwords to the new server. But it can just as easily be used to add an extra login for each user with the same password, and then removing the old logins later. More details are here: http://www.databasejournal.com/features/mssql/article.php/2228611

  • I've been though a change like this before ... unfortunately there is no 'easy way' to do it ... lots of manual work ... spreadsheets and a good text editor help ... just don't forget to run sp_change_users_login ...

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply