Changing a Windows Authentication Login in SQL Server

To change a Windows authentication username in SQL Server, you connect to the server using SQL Server Management Studio, right-click the login under Security > Logins, select Rename, type the new name, and press Enter. The change takes effect when ready, but the user must log out and log back in with their new credentials for the change to explore to their session.

Windows authentication in SQL Server ties directly to your Active Directory or local Windows account. When you rename a login, you are changing how SQL Server identifies that Windows user internally — not changing the Windows username itself. The Windows account name stays the same in your domain or computer; only the SQL Server login name changes.

Key Takeaways

  • Open SQL Server Management Studio, connect to your server, and navigate to Security > Logins to find the Windows authentication login you want to rename.
  • Right-click the login name, select Rename from the menu, type the new name, and press Enter to complete the change.
  • The new login name takes effect when ready in SQL Server, but users must disconnect and reconnect to use the new credentials.
  • Renaming a login does not change the underlying Windows account; it only changes how SQL Server refers to that user internally.
  • If the login owns databases, jobs, or other objects, those ownership links remain intact after the rename.

Before You Rename: Check What the Login Owns

Before renaming a Windows authentication login, check whether it owns any databases, SQL Agent jobs, or other objects in SQL Server. If it does, those ownership links stay with the login after the rename — but you may want to document what the login owns so you know what to update elsewhere.

To see what a login owns, right-click the login in SQL Server Management Studio and select Properties. The General tab shows the login name and default database. Click the Server Roles tab to see if the login has administrative roles like sysadmin or securityadmin. If the login owns database objects or jobs, you will need to check those separately by querying the system views or looking in the job properties.

Step-by-Step: Rename the Login in SQL Server Management Studio

Open SQL Server Management Studio on a computer that has access to your SQL Server instance. Connect to the server using an account that has administrative permissions — typically a member of the sysadmin role.

In the Object Explorer pane on the left, expand the server name, then expand Security, then click Logins. You will see a list of all logins on that server. Find the Windows authentication login you want to rename — it will show a Windows icon next to the name, not a SQL Server icon.

Right-click the login name and select Rename from the context menu. The login name becomes editable in the list. Type the new name you want to use. Press Enter to save the change. SQL Server will confirm the rename was successful.

What Happens to Permissions and Database Access

When you rename a Windows authentication login, all the permissions that login had remain attached to the new login name. If the login had access to specific databases, those database user accounts stay linked to the renamed login. If the login was a member of server roles like db_owner or db_datareader, those role memberships do not change.

The only thing that changes is the name SQL Server uses to identify the login. From the user's perspective, they still have the same access to the same databases and objects — they just log in using the new login name. This is why renaming a login is usually safe: you are not removing or adding permissions, only changing the label SQL Server puts on them.

Notifying Users and Updating Connection Strings

After you rename a login, tell the users who use that account. They will need to update any connection strings, scripts, or applications that reference the old login name. If a user has an active connection to SQL Server under the old login name, that connection will stay open — but when they disconnect and try to reconnect, they will need to use the new login name.

Check for hardcoded login names in process connection strings, scheduled jobs, SSIS packages, and any scripts that reference the login by name. Search your SQL Server instance for references to the old login name using the Find and Replace feature in SQL Server Management Studio, or by querying the system views. Update each reference to use the new login name.

Renaming a Login That Owns a Database

If the Windows authentication login you are renaming owns a database, the database ownership stays with the renamed login. You do not need to change the database owner separately. However, if you want to transfer database ownership to a different login before renaming, you can do that by right-clicking the database, selecting Properties, going to the Files page, and changing the Owner field.

If you rename a login that owns a database and later want to drop that login, SQL Server will not let you drop it while it still owns the database. You will need to transfer ownership to a different login first, then drop the original login. This is a safety feature to prevent orphaned databases.

Undoing a Rename or Fixing a Mistake

If you renamed a login by mistake, you can rename it back the same way: right-click the login, select Rename, type the original name, and press Enter. There is no undo button, but the rename operation is straightforward enough that you can correct it when ready.

If users have already started using the new login name and you want to keep both the old and new names available, you cannot rename the login back. Instead, you would need to create a new login with the old name and give it the same permissions as the renamed login. This is more work than just renaming it back before users switch over, so plan the rename during a maintenance window when users are not actively connecting.

Frequently Asked Questions

Does renaming a Windows login change my Windows username?

No. Renaming a Windows authentication login in SQL Server only changes the name SQL Server uses to identify that user. Your Windows username in Active Directory or on your local computer stays the same. SQL Server still connects to the same Windows account behind the scenes.

Can I rename a login that is currently connected to SQL Server?

Yes, you can rename a login even if a user is actively connected under that login name. The rename takes effect when ready in SQL Server, but the user's current connection stays open. When they disconnect and try to reconnect, they will need to use the new login name.

What if I rename a login and users cannot connect?

Check that users are using the new login name in their connection strings or login prompts. If they are still trying to use the old login name, they will get an authentication error. Have them update their connection strings or applications to use the new login name, then try connecting again.

Can I rename a login that has sysadmin permissions?

Yes. Renaming a login does not change its server roles or permissions. If the login is a member of the sysadmin role before the rename, it will still be a sysadmin after the rename. The role membership stays attached to the renamed login.

Do I need to restart SQL Server after renaming a login?

No. Renaming a login takes effect when ready without restarting SQL Server. Users can start using the new login name right away, though they will need to disconnect and reconnect if they have an active session under the old login name.