Created
March 18, 2019 09:15
-
-
Save fo40225/08454c6c7f79bce8126e95f467dc0f06 to your computer and use it in GitHub Desktop.
enable sa login on SQL Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER LOGIN sa ENABLE ; | |
GO | |
--change the password | |
ALTER LOGIN sa WITH PASSWORD = --'P@ssw0rd' ; | |
GO | |
USE [master] | |
GO | |
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