Server.ConnectionContext Property

Gets the current server connection details for the instance of Microsoft SQL Server.

Espacio de nombres: Microsoft.SqlServer.Management.Smo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintaxis

'Declaración
Public ReadOnly Property ConnectionContext As ServerConnection
public ServerConnection ConnectionContext { get; }
public:
property ServerConnection^ ConnectionContext {
    ServerConnection^ get ();
}
/** @property */
public ServerConnection get_ConnectionContext ()
public function get ConnectionContext () : ServerConnection

Valor de propiedad

A ServerConnection object that specifies the details of the current connection to the instance of SQL Server.

Notas

Texto actualizado:

Texto actualizado:

This property can be used to change connection settings, such as the name of the instance of SQL Server or the authentication type. The ConnectionContext property is represented by the ServerConnection class. When connecting to the local instance of SQL Server by using Windows authentication, the default values are used. You do not have to set any properties.

Este espacio de nombres, clase o miembro solamente se admite en la versión 2.0 de Microsoft .NET Framework.

Ejemplo

How to: Connect to a Remote Instance of SQL Server by Using Windows Authentication in Visual Basic .NET

How to: Copy an SMO Object in Visual Basic .NET

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

Server Class
Server Members
Microsoft.SqlServer.Management.Smo Namespace

Otros recursos

Connecting to an Instance of SQL Server
Disconnecting from an Instance of SQL Server
Administrar servidores