1

On Linux, whenever I run use mssqlsystemresource to get access to Resource Database, I get an error. How do I resolve this.

1> use mssqlsystemresource
2> go
Msg 911, Level 16, State 1, Server x230, Line 1
Database 'mssqlsystemresource' does not exist. Make sure that the name is entered correctly.

When I try to log in with sqlcmd with DAC (admin:) targeting the database with -d

$ sqlcmd -I -S admin:localhost -U sa -d mssqlsystemresource -P Password0
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Cannot open database "mssqlsystemresource" requested by the login. The login failed..
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login failed for user 'sa'..

When I try to log in with mssql-cli's -A, I get

$ mssql-cli -A -d mssqlsystemresource
Username (press enter for sa): 
Password: 

Connection did not succeed.
Error message: Cannot open database "mssqlsystemresource" requested by the login. The login failed.
Login failed for user 'sa'.
Unable to connect. Please try again
1

The mssqlsystemresource database is only available in single-user mode. On Linux, that means

sudo systemctl stop mssql-server
sudo -u mssql /opt/mssql/bin/sqlservr -m

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.