• vgullotta (3/10/2009)


    I am attempting to change a dbo login name and can't figure out how. Let me explain a little so you get what I am looking for.

    This dbo login name is: ;test

    I need to edit it to be: test

    The reason for this is that I don't want to change the password on this login name, I just want to edit the username. It is basically because when we disable a user, our disable script or something like that changes it to ';username' from 'username'. Now I need to enable this login by simply renaming the login, but I don't know how to do it. Any suggestions?

    Thanks in advance,

    If it's 2000, you'll need to delete and recreate. You can use sp_revlogin to dump the login with the encrypted password and SID and then modify the EXEC sp_addlogin to use the correct name.

    How to transfer logins and passwords between instances of SQL Server

    K. Brian Kelley
    @kbriankelley