Skip to content

Instantly share code, notes, and snippets.

@stefanteixeira
Last active September 1, 2015 16:58
Show Gist options
  • Save stefanteixeira/78bf5c4912e73826de70 to your computer and use it in GitHub Desktop.
Save stefanteixeira/78bf5c4912e73826de70 to your computer and use it in GitHub Desktop.
Script to enable mixed mode authentication in SQL Server
/*
To run the script from the DB machine, use: sqlcmd -S localhost -i C:\Path\To\File\setupMixedMode.sql
*/
USE [master]
EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'LoginMode', REG_DWORD, 2
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment