Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Server.ServerType Property

Gets the server type for the instance of SQL Server.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ServerType As DatabaseEngineType 
	Get
'Usage
Dim instance As Server 
Dim value As DatabaseEngineType 

value = instance.ServerType

Property Value

Type: Microsoft.SqlServer.Management.Common.DatabaseEngineType
A ServerType object that specifies the server type for the instance of SQL Server.

The server type indicates whether the instance of SQL Server is a matrix or a singleton.

C#

Server srv = new Server("(local)");
Console.WriteLine("The server type is " + srv.ServerType.ToString());

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
Write-Host "The server type is" $srv.ServerType
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.