Condividi tramite


InstAPI.GetSQLServerByID Metodo

Definizione

Recupera il nome del server di un'istanza SQL dall'ID istanza e dal nome host specificati.

Overload

GetSQLServerByID(String, INST_ID, StringBuilder, UInt32)
Obsoleti.

Recupera il nome del server di un'istanza SQL dall'ID istanza e dal nome host specificati.

GetSQLServerByID(String, INST_ID)

Recupera il nome del server di un'istanza SQL dall'ID istanza e dal nome host specificati.

GetSQLServerByID(String, INST_ID, StringBuilder, UInt32)

Attenzione

This overload is obsolete; use GetSQLServerByID(hostName, instanceID), instead.

Recupera il nome del server di un'istanza SQL dall'ID istanza e dal nome host specificati.

public:
 static bool GetSQLServerByID(System::String ^ hostName, Microsoft::SqlServer::INST_ID ^ instanceID, System::Text::StringBuilder ^ sqlServerName, System::UInt32 % bufferSize);
[System.Obsolete("This overload is obsolete; use GetSQLServerByID(hostName, instanceID), instead.")]
public static bool GetSQLServerByID (string hostName, Microsoft.SqlServer.INST_ID instanceID, System.Text.StringBuilder sqlServerName, ref uint bufferSize);
[<System.Obsolete("This overload is obsolete; use GetSQLServerByID(hostName, instanceID), instead.")>]
static member GetSQLServerByID : string * Microsoft.SqlServer.INST_ID * System.Text.StringBuilder * uint32 -> bool
Public Shared Function GetSQLServerByID (hostName As String, instanceID As INST_ID, sqlServerName As StringBuilder, ByRef bufferSize As UInteger) As Boolean

Parametri

hostName
String

Puntatore al nome host del server.

instanceID
INST_ID

Puntatore all'ID dell'istanza specifica.

sqlServerName
StringBuilder

Un puntatore a un buffer per la ricezione del nome del server SQL.

bufferSize
UInt32

Un puntatore a un valore DWORD per fornire la lunghezza del buffer. Restituisce la lunghezza obbligatoria se il buffer fornito è troppo piccolo.

Restituisce

true se la chiamata ha avuto esito positivo; in caso contrario, false.

Attributi

Si applica a

GetSQLServerByID(String, INST_ID)

Recupera il nome del server di un'istanza SQL dall'ID istanza e dal nome host specificati.

public:
 static System::String ^ GetSQLServerByID(System::String ^ hostName, Microsoft::SqlServer::INST_ID ^ instanceID);
public static string GetSQLServerByID (string hostName, Microsoft.SqlServer.INST_ID instanceID);
static member GetSQLServerByID : string * Microsoft.SqlServer.INST_ID -> string
Public Shared Function GetSQLServerByID (hostName As String, instanceID As INST_ID) As String

Parametri

hostName
String

Puntatore al nome host del server.

instanceID
INST_ID

Puntatore all'ID dell'istanza specifica.

Restituisce

Nome del server di un'istanza SQL dall'ID istanza e dal nome host specificati.

Si applica a