顯示具有 SSMS 22 標籤的文章。 顯示所有文章
顯示具有 SSMS 22 標籤的文章。 顯示所有文章

2026年1月30日 星期五

[研究] SQL Server Management Studio 22.2.1 離線安裝實際測試

[研究] SQL Server Management Studio 22.2.1 離線安裝實際測試

2026-01-28

環境:

  • Windows Server 2019 繁體中文標準版
  • SQL Server 2019 繁體中文標準版
  • SSMS 22.2.1版

SSMS 21 和 SSMS 22 建立 SQL Server Management Studio 的離線安裝
https://learn.microsoft.com/zh-tw/ssms/install/create-offline

SSMS 21 和 SSMS 22 安裝 SQL Server Management Studio 離線安裝的憑證
https://learn.microsoft.com/zh-tw/ssms/install/install-certificates

SSMS 21 和 SSMS 22 命令行參數
https://learn.microsoft.com/zh-tw/ssms/install/command-line-parameters#layout-command-and-command-line-parameters

SSMS 21 和 SSMS 22 語言區域清單
https://learn.microsoft.com/zh-tw/ssms/install/command-line-parameters#list-of-language-locales

SSMS 21 和 SSMS 22 工作負載和元件標識碼
https://learn.microsoft.com/zh-tw/ssms/install/workload-component-ids

下載離線安裝檔案

C:\temp\vs_SSMS.exe --layout D:\SSMS22 --lang zh-tw

下圖,開始下載離線安裝檔案


下圖,下載離線安裝檔案完成

下圖,想做成 .iso 檔案失敗,檔案名稱太長,只能壓縮成˙.zip 拿到 VM 中解壓縮

下圖,
下圖,


匯入憑證

certmgr.exe -add D:\SSMS22\certificates\manifestRootCertificate.cer -s -r LocalMachine root
certmgr.exe -add D:\SSMS22\certificates\manifestCounterSignRootCertificate.cer -s -r LocalMachine root
certmgr.exe -add D:\SSMS22\certificates\vs_installer_opc.RootCertificate.cer -s -r LocalMachine root

或

certutil.exe -addstore -f "Root" "D:\SSMS22\certificates\manifestRootCertificate.cer"
certutil.exe -addstore -f "Root" "D:\SSMS22\certificates\manifestCounterSignRootCertificate.cer"
certutil.exe -addstore -f "Root" "D:\SSMS22\certificates\vs_installer_opc.RootCertificate.cer"

實際

C:\>certmgr.exe -add D:\SSMS22\certificates\manifestRootCertificate.cer -s -r LocalMachine root
'certmgr.exe' 不是內部或外部命令、可執行的程式或批次檔。

C:\>certutil.exe -addstore -f "Root" "D:\SSMS22\certificates\manifestRootCertificate.cer"
Root "受信任的根憑證授權單位"
簽章符合公開金鑰
相關的憑證:

完全相符:
元素 4:
序號: 3f8bc8b5fc9fb29643b569d66c42e144
簽發者: CN=Microsoft Root Certificate Authority 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
 NotBefore: 2011/3/23 上午 06:05
 NotAfter: 2036/3/23 上午 06:13
主體: CN=Microsoft Root Certificate Authority 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
CA 版本: V0.0
簽章符合公開金鑰
根憑證: 主體符合簽發者
Cert 雜湊(sha1): 8f43288ad272f3103b6fb1428485ea3014c0bcfe

憑證 "Microsoft Root Certificate Authority 2011" 已在存放區中。
CertUtil: -addstore 命令成功完成。

C:\>certutil.exe -addstore -f "Root" "D:\SSMS22\certificates\manifestCounterSignRootCertificate.cer"
Root "受信任的根憑證授權單位"
簽章符合公開金鑰
相關的憑證:

完全相符:
元素 6:
序號: 28cc3a25bfba44ac449a9b586b4339aa
簽發者: CN=Microsoft Root Certificate Authority 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
 NotBefore: 2010/6/24 上午 05:57
 NotAfter: 2035/6/24 上午 06:04
主體: CN=Microsoft Root Certificate Authority 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
CA 版本: V0.0
簽章符合公開金鑰
根憑證: 主體符合簽發者
Cert 雜湊(sha1): 3b1efd3a66ea28b16697394703a72ca340a05bd5

憑證 "Microsoft Root Certificate Authority 2010" 已在存放區中。
CertUtil: -addstore 命令成功完成。

C:\>certutil.exe -addstore -f "Root" "D:\SSMS22\certificates\vs_installer_opc.RootCertificate.cer"
Root "受信任的根憑證授權單位"
簽章符合公開金鑰
相關的憑證:

完全相符:
元素 6:
序號: 28cc3a25bfba44ac449a9b586b4339aa
簽發者: CN=Microsoft Root Certificate Authority 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
 NotBefore: 2010/6/24 上午 05:57
 NotAfter: 2035/6/24 上午 06:04
主體: CN=Microsoft Root Certificate Authority 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
CA 版本: V0.0
簽章符合公開金鑰
根憑證: 主體符合簽發者
Cert 雜湊(sha1): 3b1efd3a66ea28b16697394703a72ca340a05bd5

憑證 "Microsoft Root Certificate Authority 2010" 已在存放區中。
CertUtil: -addstore 命令成功完成。

C:\>


下圖,實際畫面


下圖,


斷網,執行 D:\SSMS22\vs_SSMS.exe  (vs_setup.exe 不用你自己點)

下圖,斷網路

下圖,執行 vs_SSMS.exe


下圖,執行 vs_SSMS.exe


下圖,按下「繼續」按鈕後,工作管理員沒看到?(疑問?)

下圖,改用 vs_setup.exe

下圖,


下圖,按下「繼續」按鈕後,工作管理員沒看到?(疑問?)

檢查離線安裝失敗 Log


 vs_SSMS.exe失敗 Log

[0f08:0001][2026-01-28T11:43:50] Assembly version: 4.0.2168.39045.
[0f08:0001][2026-01-28T11:43:50] Creating new ExperimentationService
[0f08:0001][2026-01-28T11:43:50] Telemetry property VS.ABExp.Flights : 
[0f08:0001][2026-01-28T11:43:50] Command line arguments = --env,_SFX_CAB_EXE_PACKAGE:D:\SSMS22\vs_SSMS.exe _SFX_CAB_EXE_ORIGINALWORKINGDIR:D:\SSMS22
[0f08:0001][2026-01-28T11:43:50] C2R signature did not exist or could not be read: 
[0f08:0001][2026-01-28T11:43:50] Parent process name = vs_SSMS
[0f08:0001][2026-01-28T11:43:50] Parent process product version = 18.2.11415.280
[0f08:0001][2026-01-28T11:43:50] CampaignId = 
[0f08:0001][2026-01-28T11:43:50] Warning: ResponseId not available in 'vs_setup_bootstrapper.config'. Trying to parse filename.
[0f08:0001][2026-01-28T11:43:50] Warning: loading config settings: -update --update --layout -offline --offline --locale --layout --originalworkingdir --installLayoutPath --env
[0f08:0001][2026-01-28T11:43:50] Trying to get response file path from layout.
[0f08:0001][2026-01-28T11:43:50] Returning response file path as: D:\SSMS22\Response.json.
[0f08:0001][2026-01-28T11:43:50] DownloadURL = https://aka.ms/ssms/22/release/installer
[0f08:0001][2026-01-28T11:43:50] InstallLocation = C:\Program Files (x86)\Microsoft Visual Studio\Installer
[0f08:0001][2026-01-28T11:43:50] OfflineFilePath = D:\SSMS22\vs_installer.opc
[0f08:0001][2026-01-28T11:43:50] LayoutLocation = 
[0f08:0001][2026-01-28T11:43:50] ExecutableArguments = /finalizeInstall install --layoutPath "D:\SSMS22" --in "D:\SSMS22\Response.json" --locale zh-TW --activityId "73561dcb-eee1-4c58-a028-6db78a7b6f5f"
[0f08:0001][2026-01-28T11:43:50] OSVersion = Microsoft Windows NT 10.0.17763.0
[0f08:0001][2026-01-28T11:43:50] Starting to detect the existing VS and .NET...
[0f08:0001][2026-01-28T11:43:50] Finished detecting the existing VS and .Net
[0f08:0004][2026-01-28T11:44:00] NoWeb or OfflineFilePath specified, skipping latest installer feed check.
[0f08:0004][2026-01-28T11:44:00] Existing client is unsupported: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe does not exist.
[0f08:0004][2026-01-28T11:44:00] Using Offline package: D:\SSMS22\vs_installer.opc
[0f08:0004][2026-01-28T11:44:00] Saving Certificates to layout folder
[0f08:0004][2026-01-28T11:44:00] Certificate is invalid: D:\SSMS22\vs_installer.opc
[0f08:0004][2026-01-28T11:44:00] Error: Unable to verify the certificate: InvalidCertificate
[0f08:0004][2026-01-28T11:44:00] Error 0x80131509: Signature verification failed. Error: Unable to verify the integrity of the installation files: the certificate could not be verified.
   於 Microsoft.VisualStudio.Setup.OpcVerifier.Verify(Stream packageStream, String layoutLocation, Boolean skipSavingCertificate)
   於 Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.VerifyLayoutPackage(Stream packageStream)
[0f08:0004][2026-01-28T11:44:00] Bootstrapper failed with known error.

 vs_setup.exe失敗 Log

[1584:0001][2026-01-28T11:45:54] Assembly version: 4.0.2168.39045.
[1584:0001][2026-01-28T11:45:54] Creating new ExperimentationService
[1584:0001][2026-01-28T11:45:54] Telemetry property VS.ABExp.Flights : 
[1584:0001][2026-01-28T11:45:55] Command line arguments = --env,_SFX_CAB_EXE_PACKAGE:D:\SSMS22\vs_setup.exe _SFX_CAB_EXE_ORIGINALWORKINGDIR:D:\SSMS22
[1584:0001][2026-01-28T11:45:55] C2R signature did not exist or could not be read: 
[1584:0001][2026-01-28T11:45:55] Parent process name = vs_setup
[1584:0001][2026-01-28T11:45:55] Parent process product version = 18.2.11415.280
[1584:0001][2026-01-28T11:45:55] CampaignId = 
[1584:0001][2026-01-28T11:45:55] Warning: ResponseId not available in 'vs_setup_bootstrapper.config'. Trying to parse filename.
[1584:0001][2026-01-28T11:45:55] Warning: loading config settings: -update --update --layout -offline --offline --locale --layout --originalworkingdir --installLayoutPath --env
[1584:0001][2026-01-28T11:45:55] Trying to get response file path from layout.
[1584:0001][2026-01-28T11:45:55] Returning response file path as: D:\SSMS22\Response.json.
[1584:0001][2026-01-28T11:45:55] DownloadURL = https://aka.ms/ssms/22/release/installer
[1584:0001][2026-01-28T11:45:55] InstallLocation = C:\Program Files (x86)\Microsoft Visual Studio\Installer
[1584:0001][2026-01-28T11:45:55] OfflineFilePath = D:\SSMS22\vs_installer.opc
[1584:0001][2026-01-28T11:45:55] LayoutLocation = 
[1584:0001][2026-01-28T11:45:55] ExecutableArguments = /finalizeInstall install --layoutPath "D:\SSMS22" --in "D:\SSMS22\Response.json" --locale zh-TW --activityId "ef700274-05ac-43ee-849c-ed5e8f297105"
[1584:0001][2026-01-28T11:45:55] OSVersion = Microsoft Windows NT 10.0.17763.0
[1584:0001][2026-01-28T11:45:55] Starting to detect the existing VS and .NET...
[1584:0001][2026-01-28T11:45:55] Finished detecting the existing VS and .Net
[1584:0007][2026-01-28T11:45:59] NoWeb or OfflineFilePath specified, skipping latest installer feed check.
[1584:0007][2026-01-28T11:45:59] Existing client is unsupported: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe does not exist.
[1584:0007][2026-01-28T11:45:59] Using Offline package: D:\SSMS22\vs_installer.opc
[1584:0007][2026-01-28T11:45:59] Saving Certificates to layout folder
[1584:0007][2026-01-28T11:45:59] Certificate is invalid: D:\SSMS22\vs_installer.opc
[1584:0007][2026-01-28T11:45:59] Error: Unable to verify the certificate: InvalidCertificate
[1584:0007][2026-01-28T11:45:59] Error 0x80131509: Signature verification failed. Error: Unable to verify the integrity of the installation files: the certificate could not be verified.
   於 Microsoft.VisualStudio.Setup.OpcVerifier.Verify(Stream packageStream, String layoutLocation, Boolean skipSavingCertificate)
   於 Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.VerifyLayoutPackage(Stream packageStream)
[1584:0007][2026-01-28T11:45:59] Bootstrapper failed with known error.

*****

添加參數 --noWeb 安裝看看

D:\SSMS22>vs_SSMS.exe --noWeb

D:\SSMS22>

檢視 Log


[1b64:0001][2026-01-28T12:57:30] Assembly version: 4.0.2168.39045.
[1b64:0001][2026-01-28T12:57:30] Creating new ExperimentationService
[1b64:0001][2026-01-28T12:57:30] Telemetry property VS.ABExp.Flights : 
[1b64:0001][2026-01-28T12:57:30] Command line arguments = --noWeb,--env,_SFX_CAB_EXE_PACKAGE:D:\SSMS22\vs_SSMS.exe _SFX_CAB_EXE_ORIGINALWORKINGDIR:D:\SSMS22
[1b64:0001][2026-01-28T12:57:30] C2R signature did not exist or could not be read: 
[1b64:0001][2026-01-28T12:57:30] Parent process name = vs_SSMS
[1b64:0001][2026-01-28T12:57:30] Parent process product version = 18.2.11415.280
[1b64:0001][2026-01-28T12:57:30] CampaignId = 
[1b64:0001][2026-01-28T12:57:30] Warning: ResponseId not available in 'vs_setup_bootstrapper.config'. Trying to parse filename.
[1b64:0001][2026-01-28T12:57:30] Warning: loading config settings: -update --update --layout -offline --offline --locale --layout --originalworkingdir --installLayoutPath --env
[1b64:0001][2026-01-28T12:57:30] Trying to get response file path from layout.
[1b64:0001][2026-01-28T12:57:30] Returning response file path as: D:\SSMS22\Response.json.
[1b64:0001][2026-01-28T12:57:30] DownloadURL = https://aka.ms/ssms/22/release/installer
[1b64:0001][2026-01-28T12:57:30] InstallLocation = C:\Program Files (x86)\Microsoft Visual Studio\Installer
[1b64:0001][2026-01-28T12:57:30] OfflineFilePath = D:\SSMS22\vs_installer.opc
[1b64:0001][2026-01-28T12:57:30] LayoutLocation = 
[1b64:0001][2026-01-28T12:57:30] ExecutableArguments = /finalizeInstall install --layoutPath "D:\SSMS22" --in "D:\SSMS22\Response.json" --noWeb --locale zh-TW --activityId "a38ef7cc-bcb4-4e70-8192-3853d55c463d"
[1b64:0001][2026-01-28T12:57:30] OSVersion = Microsoft Windows NT 10.0.17763.0
[1b64:0001][2026-01-28T12:57:30] Starting to detect the existing VS and .NET...
[1b64:0001][2026-01-28T12:57:30] Finished detecting the existing VS and .Net
[1b64:0007][2026-01-28T12:57:34] NoWeb or OfflineFilePath specified, skipping latest installer feed check.
[1b64:0007][2026-01-28T12:57:34] Existing client is unsupported: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe does not exist.
[1b64:0007][2026-01-28T12:57:34] Using Offline package: D:\SSMS22\vs_installer.opc
[1b64:0007][2026-01-28T12:57:34] Saving Certificates to layout folder
[1b64:0007][2026-01-28T12:57:34] Certificate is invalid: D:\SSMS22\vs_installer.opc
[1b64:0007][2026-01-28T12:57:34] Error: Unable to verify the certificate: InvalidCertificate
[1b64:0007][2026-01-28T12:57:34] Error 0x80131509: Signature verification failed. Error: Unable to verify the integrity of the installation files: the certificate could not be verified.
   於 Microsoft.VisualStudio.Setup.OpcVerifier.Verify(Stream packageStream, String layoutLocation, Boolean skipSavingCertificate)
   於 Microsoft.VisualStudio.Setup.Bootstrapper.Bootstrapper.VerifyLayoutPackage(Stream packageStream)
[1b64:0007][2026-01-28T12:57:34] Bootstrapper failed with known error.

原因待查,失敗。

(完)

2025年12月8日 星期一

[研究]SQL Server Management Studio 22.0.0 (SSMS 22.0.0) 安裝

[研究]SQL Server Management Studio 22.0.0  (SSMS 22.0.0) 安裝

2025-12-08

SQL Server Management Studio (SSMS) 22.0.0 於 2025-11-11 釋出
https://learn.microsoft.com/zh-tw/ssms/release-notes-22

SSMS 自 21 版改用 VSTA 建構,介面大改,預設使用 Internet 線上安裝。

[研究]SQL Server Management Studio (SSMS) 22 預覽版2 (Preview 2)下載 安裝

【離線安裝】
建立 SQL Server Management Studio 的離線安裝
Create an offline installation of SQL Server Management Studio
語法:vs_SSMS.exe --layout C:\SSMS_Layout --all













下圖,12/08的,除了 picpick 外,都是 SSMS 22 安裝的。

SSMS 22.0 安裝了下面軟體

Microsoft Edge WebView2 執行階段 142.0.3595.94 2025/12/8
Microsoft Visual C+++v14 Redistibutsble (x64)-14.50 35710 14.50.35710.0
Microsoft Visual C++++ v14 Redistributable (x86) - 14.50.35710 14.50.35710.0
Microsoft Visual Studio Installer 4.0.2166.47498
SQL Server Management Studio 22 22.0.0
vs_CoreEditorFonts 17.7.40001
適用於SQLServer 的 Microsoft OLE DB 驅動程式19 19.4.1.0

**********
1. 必需或建議保留
  • SQL Server Management Studio 22 22.0.0
    → 這是主要軟體,當然不能刪除。
  • 適用於 SQL Server 的 Microsoft OLE DB 驅動程式 19 19.4.1.0
    → SSMS 和其他 SQL Server 工具用來連線 SQL Server,刪除可能會導致連線失敗。
  • Microsoft Visual C++ v14 Redistributable (x64) & (x86) - 14.50
    → SSMS 及其元件可能依賴這些 C++ 執行庫,刪除後可能導致 SSMS 或某些插件無法啟動。
  • Microsoft Edge WebView2 執行階段 142.0.3595.94
    → 新版 SSMS 的部分視覺介面、報表或內嵌瀏覽器功能依賴 WebView2,如果刪除,可能導致內嵌瀏覽器無法顯示(例如報表、啟動頁面等)。

2. 可選或可移除
  • Microsoft Visual Studio Installer 4.0.2166.47498
    → 只用於安裝/更新 Visual Studio 或相關組件,如果你不打算用 Visual Studio 或其擴充元件,可以移除。SSMS 自身不依賴它。(註:SSMS 22 使用它安裝,與 SSMS <= 20 不同,敝人建議別移除)
  • vs_CoreEditorFonts 17.7.40001
    → 這是 Visual Studio 字型套件,SSMS 可能會使用 Visual Studio 字型做顯示,但不是必要。刪除後可能改變編輯器字型,但不影響功能。(註:SSMS 22 既然安裝了,表示字體可能非Windows預設狀況,移除可能外觀顯示有差異,敝人建議別移除)
(完)

相關

SQL Server Management Studio (SSMS) 版本資訊
https://learn.microsoft.com/zh-tw/ssms/release-notes-22

安裝 SQL Server Management Studio

2025年11月17日 星期一

[研究]SSMS 20.2.1 和 SSMS 22 可以共存 ?

[研究]SSMS 20.2.1  和 SSMS 22 可以共存 ?

2025-11-17

SQL Server Management Studio (SSMS)


SSMS 20.2.1  和 SSMS 22 可以共存 ?

可以的,SSMS 20.2.1 和 SSMS 22 是可以共存 (side‑by‑side) 安裝。根據 Microsoft 文件:

  • 官方有提到「可以在已安裝舊版 SSMS(例如 20.x)的電腦上安裝 SSMS 22」 
  • 系統需求中也明確說 SSMS 22 支援與 SSMS 20.x、19.x 等版本並存安裝。 
  • 若你要安裝不同版本,只要從各自版本的 bootstrapper 安裝即可。 

注意事項 /建議:

  1. 若你在兩版本間開啟同一個 .sln 解決方案檔 (solution),可能要注意相容性。根據官方說明:如果你用 SSMS 21 (或 22) 開啟 SSMS 20 建出的方案,修改後會提示你另存為新 .sln。 
  2. 如果你卸載其中一個版本(例如要移除 SSMS 20),可能會移除所有版本的檔案關聯 (file associations)。 
  3. 建議安裝時備份你的設定 (例如工具列、視窗配置),以免版本切換時造成不便。

參考

並存安裝 SQL Server Management Studio 版本
https://learn.microsoft.com/zh-tw/ssms/install/side-by-side

根據上面資訊,敝人建議不要安裝多套 SSMS,而且安裝新版本前,最好先移除舊版,免得後移除舊版,檔案關聯都沒了。

(完)

相關

[研究]SQL Server Management Studio (SSMS) 22.0.0 於 2025-11-11 釋出

[研究]SSMS 20.2.1 和 SSMS 22 可以共存 ?

[研究]SSMS 20.2.1 的 VSTA 2019 需要線上安裝 ? 可離線安裝 ?

[研究]SQL Server Management Studio(SSMS) 20.2 不升級到 SSMS 20.2.1 會有 安全性問題 ?

[研究]SQL Server Update 會更新 SQL Server Management Studio (SSMS) ? 如果 SSMS 20.2 沒更新到 20.2.1 ,何時會通知 ?