You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL Linux : 2022 SQLCMD: 1.5.0 GO (OI also tried sqlcmd ODBC mssql-tools18 ) Scenario: Stared SQL server on Ubuntu Linux 20.04 singe-yuser mode SQL command: use [master]; RESTORE DATABASE [master] FROM DISK = N'/var/opt/mssql/data/master.bak' WITH FILE=1, MOVE N'master' to N'/var/opt/mssql/data/master.mdf', MOVE N'mastlog' to N'/var/opt/mssql/data/mastlog.ldf', NOUNLOAD, REPLACE, STATS=5; GO
output
Msg 3168, Level 16, State 1, Server redacted, Line 2
The backup of the system database on the device /var/opt/mssql/data/master.bak cannot be restored because it was created by a different version of the server (16.00.4095) than this server (16.00.4105).
Msg 3013, Level 16, State 1, Server redacted, Line 2
RESTORE DATABASE is terminating abnormally.
The SQL server difference between the earlier backup was one service pack, not even a different SQL server version. It did not make sense and I wanted to report it here in case this is an issue with the sqlcmd tool.
The assumption is that one can restore a backup made in earlier versions of SQL and restore it to later versions of SQL. Am I missing something?
The text was updated successfully, but these errors were encountered:
The issue here is the database in question being restore is a "system" database, not a "user" database.
Explanation here:
"""
You can't restore a backup of a system database (master, model, or msdb) on a server build that differs from the build on which the backup was originally created.
"""
SQL Linux : 2022
SQLCMD: 1.5.0 GO (OI also tried sqlcmd ODBC mssql-tools18 )
Scenario: Stared SQL server on Ubuntu Linux 20.04 singe-yuser mode
SQL command:
use [master]; RESTORE DATABASE [master] FROM DISK = N'/var/opt/mssql/data/master.bak' WITH FILE=1, MOVE N'master' to N'/var/opt/mssql/data/master.mdf', MOVE N'mastlog' to N'/var/opt/mssql/data/mastlog.ldf', NOUNLOAD, REPLACE, STATS=5; GO
output
The SQL server difference between the earlier backup was one service pack, not even a different SQL server version. It did not make sense and I wanted to report it here in case this is an issue with the sqlcmd tool.
The assumption is that one can restore a backup made in earlier versions of SQL and restore it to later versions of SQL. Am I missing something?
The text was updated successfully, but these errors were encountered: