I understand this should be searched online. I did but most of the links point to SSMS and UI for doing this. I am relying on Visual Studio 2012 SSDT and self-typed SQL query.

Please help me with below SQL command to set sa password.

 CREATE LOGIN [sa]
 WITH PASSWORD = N'MyPassword', DEFAULT_LANGUAGE = [us_english];
 GO 

 ALTER LOGIN [sa] ENABLE
有帮助吗?

解决方案

It really helps if you post whatever error you are getting.

sa should already exist so you can't create it again. You can change it's password with this if you have sufficient privileges. If you have an error post it.

ALTER LOGIN sa WITH PASSWORD=N'NewPassword'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top