Propriété ServerType
Obtient le type de serveur pour l'instance de SQL Server.
Espace de noms : Microsoft.SqlServer.Management.Smo
Assembly : Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Syntaxe
'Déclaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Expensive Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ServerType As DatabaseEngineType
Get
'Utilisation
Dim instance As Server
Dim value As DatabaseEngineType
value = instance.ServerType
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public DatabaseEngineType ServerType { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Expensive|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
property DatabaseEngineType ServerType {
DatabaseEngineType get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Expensive|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
member ServerType : DatabaseEngineType
function get ServerType () : DatabaseEngineType
Valeur de propriété
Type : Microsoft.SqlServer.Management.Common. . :: . .DatabaseEngineType
Objet ServerType qui spécifie le type de serveur pour l'instance de SQL Server.
Notes
The server type indicates whether the instance of SQL Server is a matrix or a singleton.
Exemples
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
Voir aussi