Server.ConnectionContext Property
Gets the current server connection details for the instance of SQL Server.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Deklaracja
Public ReadOnly Property ConnectionContext As ServerConnection
public ServerConnection ConnectionContext { get; }
public:
virtual property ServerConnection^ ConnectionContext {
ServerConnection^ get () sealed;
}
/** @property */
public final ServerConnection get_ConnectionContext ()
public final function get ConnectionContext () : ServerConnection
Property Value
A ServerConnection object that specifies the details of the current connection to the instance of SQL Server.
Remarks
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.
Thread Safety
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.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.