Upgrade the Mssql-server package to the latest version
sudo yum update mssql-server
This command downloads the latest package and replaces the binaries under/opt/mssql/. User-generated databases and system databases are not affected by this operation.
Rolling back SQL Server to a previous version
1. Identify the SQL Server version number you want to downgrade to. A list of corresponding version numbers, see here.
2. Downgrade to a previous version of SQL Server. Replace <version_number> with the version number in step 1.
sudo yum downgrade mssql-server-<version_number>.x86_64
Note: Only one version that is downgraded to the same major version is supported, like SQL Server 2017.
Check the version of SQL Server that is installed
To verify the version of SQL Server currently running on Linux, use the following procedure:
1. Install the SQL Server command-line tool.
2. Run the following command:
Sqlcmd-s localhost-u sa-q ' SELECT @ @VERSION '
Uninstalling SQL Server
In order to remove the Mssql-server package running on Linux, use the following command:
sudo yum remove mssql-server
Removing a package does not delete the resulting database file. If you want to delete a database file, you can use the following command:
sudo rm-rf/var/opt/mssql/
Upgrading, rolling back, and uninstalling SQL Server 2017 on Linux