Windows way to Digital Learning……

Posts tagged ‘How to change or reset the SA password for MSSQL in Linux’

How to change or reset the SA password for MSSQL in Linux

How to change or reset the SA password for MSSQL in Linux

To  reset SA password execute:

First you need to stop  mssql-server  using this command

 sudo systemctl stop myssql-server

sudo /opt/mssql/bin/mssql-conf setup

Setting up Microsoft SQL Server

Enter the new SQL Server system administrator password:

Confirm the new SQL Server system administrator password:

Starting Microsoft SQL Server…

Enabling Microsoft SQL Server to run at boot…

Setup completed successfully.

To change MSSQL SA password

Login to MSSQL by executing these commands.

    cd /opt/mssql-tools/bin/

    ./sqlcmd -S srv01 -U sa 

To change MSSQL sa account password, execute these commands.

EXEC sp_password NULL, 'Mssql@12345','sa'

go

 

mssql-sa-pwd-change-linux

Tag Cloud