共用方式為


Get-MasterDataServicesDatabaseServerInformation (PowerShell)

取得指定之 SQL Server 執行個體的連接資訊。

語法

Get-MasterDataServicesDatabaseServerInformation [-ConnectionString] <String>

說明

Get-MasterDataServicesDatabaseServerInformation 會傳回連接指定之 SQL Server 執行個體的資料庫伺服器資訊物件,以及取得該執行個體的相關資訊。它會確認指定的 SQL Server 執行個體是否為可主控 Master Data Services 資料庫的支援版本。 

參數

-ConnectionString

ConnectionString 參數是指定 SQL Server 執行個體連接資訊的字串。

必要項?

true

位置?

0

預設值

接受管線輸入

false

接受萬用字元?

false

輸入和輸出

輸入類型是可透過管道傳送至指令程式的物件類型。傳回類型是指令程式所傳回的物件類型。

輸入

輸出

Microsoft.MasterDataServices.Configuration.DatabaseServerInformation

Get-MasterDataServicesDatabaseServerInformation 會傳回連接指定之 SQL Server 執行個體的資料庫伺服器資訊物件。

範例

輸出

下列是使用這個指令程式時傳回的輸出範例。

IsSkuValid         : True
IsVersionValid     : True
SqlInstance        : MyServer\MyInstance
SqlSku             : Enterprise
SqlVersion         : 10.50.NNNN.N
IsValid            : True
IsConnectionTested : True
Collations         : {Albanian, Arabic, Assamese, Azeri_Cyrillic...}
ServerProperties   : Microsoft.MasterDataServices.Configuration.DatabaseServerProperties
Connection         : System.Data.SqlClient.SqlConnection
ConnectionString   : Data Source=MyServer\MyInstance;Integrated Security=True;Persist Security Info=True;Pooling=False
IsSqlAdministrator : True

使用具名參數

這個範例將 ConnectionString 參數指定為具名參數,以連接並取得指定之 SQL Server 執行個體的資訊。這個物件也可以選擇性地透過管道傳送至其他需要連接主控 Master Data Services 資料庫之伺服器的 Master Data Services 指令程式。

C:\PS> Get-MasterDataServicesDatabaseServerInformation -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password='