Server.ServerType 属性
Gets the server type for the instance of SQL Server.
命名空间: Microsoft.SqlServer.Management.Smo
程序集: Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)
语法
声明
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ServerType As DatabaseEngineType
Get
用法
Dim instance As Server
Dim value As DatabaseEngineType
value = instance.ServerType
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public DatabaseEngineType ServerType { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
property DatabaseEngineType ServerType {
DatabaseEngineType get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
member ServerType : DatabaseEngineType
function get ServerType () : DatabaseEngineType
属性值
类型: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
请参阅
参考
Microsoft.SqlServer.Management.Smo 命名空间