卸载SQL Server 2017后,如何让SSMS切换至SQL Server 2019版本?
Hey there, let's fix this SSMS version switch issue step by step. I've run into this exact scenario before, so here's what works:
解决SSMS未切换至SQL Server 2019的问题
1. 确认SSMS版本是否适配SQL Server 2019
- Old SSMS versions (like 17.x) often stick to legacy SQL Server instances. First, check your SSMS version: go to
帮助→关于in the top menu. If it's 17.x or lower, uninstall this old SSMS completely, then install the latest SSMS version that supports SQL Server 2019 (version 18.x and above are recommended).
2. Verify SQL Server 2019 services are running
- Open the Services app by pressing Win+R and typing
services.msc. Look for services starting withSQL Server—make sureSQL Server (MSSQLSERVER)(or your custom instance name) is inRunningstatus, with a startup type set toAutomatic. - If the service isn't running, right-click it and select
Start, then restart SSMS to test.
3. Manually select the 2019 instance in SSMS connection window
- When opening SSMS, in the connection window's
服务器名称dropdown, choose浏览更多→数据库引擎. You'll see your SQL Server 2019 instance (usually[your PC name]\MSSQLSERVERor your custom instance name). - Select this instance and click
连接. You can also set it as the default in the dropdown so SSMS uses it automatically next time.
4. Clean up leftover registry entries (proceed with caution)
- Sometimes leftover registry settings from 2017 can make SSMS default to the old instance. Press Win+R, type
regeditto open Registry Editor:- Navigate to
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\Client\SNI\18.0\LastConnect(adjust the SNI number based on your SSMS version—18 corresponds to SSMS 18). - Find the
Serverkey, double-click it, and change its value to your 2019 instance name (e.g.,localhostor your PC name). - Important: Backup the registry before making any changes to avoid accidental issues.
- Navigate to
5. Repair SQL Server 2019 client components (optional)
- If all else fails, the 2019 client tools might not be installed correctly. Open SQL Server Installation Center, go to
维护→修复, select your 2019 instance, and make sure components like客户端工具连接are checked during the repair process.
内容的提问来源于stack exchange,提问作者عبدالله اسامه




