Свойство 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