Can’t login to SQL Server with Windows Authentication? Forgot to add the local administrator account to the sysadmin server role but SQL Server is configured for Windows Authentication only? If you can change SQL Server to mixed mode Authentication, it would save you having to do a reinstall.

The SA account will be automatically created on every new SQL Server installation. But this account is disabled by default if you select Windows Authentication during setup. In this article I’ll show you how to enable mixed mode authentication after installation, and unlock / enable the SA account login if you’re locked out of a SQL Server instance.

Part 1: Enable Mixed Mode Authentication

If you can connect to SQL Server with SQL Server Management Studio, you can easily switch to mixed mode with just a few mouse clicks! However, what to do if you’re locked out of every SQL Server account and can’t login even with Windows Authentication? Here is a simple registry trick:

Press the Windows key + R to bring up the Run box. Type regedit and press Enter. Navigate to the registry location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQLServer , where MSSQL10.SQLEXPRESS is the name of your SQL Server instance. In the right panel, change the LoginMode from 1 to 2. (1 = Windows authentication Only. 2 = Mixed mode.) Restart your SQL Server instance for this change to take effect.

Part 2: Enable / Unlock SA Account

Even if the authentication mode is switched to SQL Server mixed mode after the installation, the SA account is still disabled and must be manually enabled. With SQL Server Password Changer you can offline enable / unlock your SA account in case your SA account is disabled, locked out or you simply forgot the password. Here are steps: