查看Windows服務器安裝了那些SQL Server組件

如何查看Windows服務器安裝了那些SQL Server組件呢? 最近就遇到這樣一個需求,需要知道Windows服務器是否安裝了Replication組件,那麼有幾種方法查看Windows服務器安裝了哪些SQL Server組件呢?下面總結一下這方面的方法,希望對遇到這樣問題的人有所幫助!

 

1:通過SQL Server Features Discovery Report查看。

    在開始菜單找到“SQL Server Installation Center"應用程序打開,然後在Tools下點擊Installed SQL Server features discovery report後,就能生成如下Html報告。優點是快速生成詳細、全面的報告。簡便快捷。如果掛載了安裝介質,還可以使用命令“setup.exe /action=RunDiscovery /Quiet”

clip_image001[8]

clip_image002[9]

 

2:從菜單的所有程序進去查看已經安裝的組件。

 這種方式完全是體力活,費時費力,除非是沒有方法的前提下,纔會使用這種方式。完全不推薦這種方法。

 

3:使用 PowerShell命令查看

PS C:\Windows\system32> Get-Service *SQL*
 
Status   Name               DisplayName
------   ----               -----------
Stopped  ApexSqlSscHost     ApexSQL server side components host...
Stopped  MSSQLFDLauncher    SQL Full-text Filter Daemon Launche...
Running  MSSQLSERVER        SQL Server (MSSQLSERVER)
Stopped  SQL Server Dist... SQL Server Distributed Replay Client
Stopped  SQL Server Dist... SQL Server Distributed Replay Contr...
Stopped  SQLBrowser         SQL Server Browser
Running  SQLSERVERAGENT     SQL Server Agent (MSSQLSERVER)
Stopped  SQLWriter          SQL Server VSS Writer

上面命令只能查看服務,其實很多組件無法查看。那麼可以查看WMI class win32_product ,在PowerShell下執行下面命令就看查看安裝組件。

get-wmiobject win32_product | where {$_.Name -match "SQL" -AND $_.vendor -eq "Microsoft Corporation"} | select name, version

clip_image003[8]

 

參考資料:

https://dba.stackexchange.com/questions/77016/how-to-obtain-sql-feature-list-from-the-command-line

https://www.mytechmantra.com/LearnSQLServer/Discover-SQL-Server-Components-Installed-Using-SQL-Server-Discovery-Tool/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章