Introduction
This article is about how to proceed when you get error message 'Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'sa'.. 'Problem Definition
SA Password is entered wrong more than three times then SA account will be locked or someone wants to reset the password.Solution
Using mssql-conf setup need following step:- (this require reboot SQL Server)1. Conf setup
Yyou need to stop mssql-server using this command -conf setup command
sudo systemctl stop mssql-server
sudo /opt/mssql/bin/mssql-conf setup
- Setting up Microsoft SQL Server
- Enter the new SQL Server system administrator password: --Enter strong password here
- Confirm the new SQL Server system administrator password: --Enter strong password here
- Starting Microsoft SQL Server...
- Enabling Microsoft SQL Server to run at boot...
- Setup completed successfully.
- Check Mssql services status using command sudo systemctl status mssql-server
2. Change password using sp_password
- Login with User who having sysadmin access on the server.
- syntax: sp_password NULL, ‘<insert_new_password_here>’, ’sa’
- command :
sp_password NULL, 'Mssql@12345', 'sa'
3. Using GUI using Window server:
Install new version of SSMS -->SSMS 17.4 is the latest version of SQL Server Management Studio.
a. Connect Linux SQL server on Windows server using SSMS.b. Select the Security->Logins folder on the left side of your window; Right-click “sa” and choose properties;
c.Change password and confirm with complexity.
orignal article
No comments:
Post a Comment