ubuntu 卸载sql
We learned to install SQL Server 2019 installation on Ubuntu without a Docker Container in one of my previous articles, but we might also get a request to uninstall SQL Server running on Ubuntu as well. Both the installation and the uninstallation of SQL Server is different in Linux than of Windows OS. In windows, we can remove or uninstall any program using the add or remove programs feature. In Ubuntu, We need to run the commands in order to uninstall the programs. However, before performing uninstallation, we need to take care of the below point.
在我之前的一篇文章中,我们学会了在没有Docker容器的情况下在Ubuntu上安装SQL Server 2019安装 ,但是我们也可能会收到卸载在Ubuntu上运行SQL Server的请求。 在Linux和Windows OS中,SQL Server的安装和卸载都不同。 在Windows中,我们可以使用“添加或删除程序”功能删除或卸载任何程序。 在Ubuntu中,我们需要运行命令以卸载程序。 但是,在执行卸载之前,我们需要注意以下几点。
- SQL Server Databases backups: We cannot revert back once we have uninstalled SQL Server. Therefore, while planning uninstallation, we should carefully look at the databases and see if we require them on a later date. If yes, take a full database backup and move those backup files to a separate location. You can take database backup from SSMS, Azure data studio or the command line tools like a normal database in SQL Server. We should not keep the database backups under the default directory (/var/opt/mssql/data) because this will be removed as part of clean uninstallation of SQL Server.
- SQL Server数据库备份 :卸载SQL Server后,我们将无法还原。 因此,在计划卸载时,我们应该仔细查看数据库,看看以后是否需要它们。 如果是,请执行完整的数据库备份,然后将这些备份文件移动到单独的位置。 您可以从SSMS,Azure数据工作室或命令行工具(如SQL Server中的普通数据库)进行数据库备份。 我们不应该将数据库备份保留在默认目录(/ var / opt / mssql / data)下,因为这将作为SQL Server干净卸载的一部分而被删除。