Export (0) Print
Expand All

ConnectionManager Class

The ConnectionManager class manages the connection to an instance of SQL Server.

Namespace:  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

public abstract class ConnectionManager : ConnectionSettings

The ConnectionManager type exposes the following members.

  NameDescription
Public propertyApplicationNameGets or sets the name of the application that has established the connection with the server. (Inherited from ConnectionSettings.)
Public propertyAutoDisconnectModeGets or sets the automatic disconnection mode of the referenced connection to the instance of SQL Server.
Public propertyCapturedSqlGets the Transact-SQL statements that are captured when the connection is running in capture mode.
Public propertyConnectAsUserGets or sets the Boolean property value that specifies whether the connection is established using impersonation. (Inherited from ConnectionSettings.)
Public propertyConnectAsUserNameGets or sets the name of the user when connecting using impersonation. (Inherited from ConnectionSettings.)
Public propertyConnectAsUserPasswordGets or sets the password for the user when connecting using impersonation. (Inherited from ConnectionSettings.)
Public propertyConnectionStringGets or sets the connection string used to establish a connection with a specified data source. (Inherited from ConnectionSettings.)
Public propertyConnectTimeoutGets or sets the connection time-out period in seconds. (Inherited from ConnectionSettings.)
Public propertyDatabaseEngineTypeGets the database engine type.
Public propertyDatabaseNameGets or sets the database required by the connection. (Inherited from ConnectionSettings.)
Public propertyEncryptConnectionGets or sets the Boolean property value that specifies whether the connection is encrypted. (Inherited from ConnectionSettings.)
Public propertyInUseGets or sets the Boolean property value that specifies whether the connection is being used.
Public propertyIsForceDisconnectedGets a Boolean value that specifies whether the connection was forcibly disconnected.
Public propertyIsOpenGets the Boolean property value that specifies whether the connection is currently open.
Public propertyLockTimeoutGets or sets the time in seconds required for the connection to time out when the current transaction is locked.
Public propertyLoginGets or sets the logon required to establish a connection with the instance of the server. (Inherited from ConnectionSettings.)
Public propertyLoginSecureGets or sets the Boolean property that specifies whether the connection is established to the server by using Windows Authentication or SQL Server Authentication. (Inherited from ConnectionSettings.)
Public propertyMaxPoolSizeGets or sets the maximum number of connections in a connection pool that the specified connection accepts when establishing a connection with a server. (Inherited from ConnectionSettings.)
Public propertyMinPoolSizeGets or sets the minimum number of connections in a connection pool that the specified connection accepts when establishing a connection with a server. (Inherited from ConnectionSettings.)
Public propertyMultipleActiveResultSetsGets or sets the Boolean property value that specifies whether more than one active result set is permitted. (Inherited from ConnectionSettings.)
Public propertyNetworkProtocolGets or sets the network protocol used to establish the connection to the server. (Inherited from ConnectionSettings.)
Public propertyNonPooledConnectionGets or sets the Boolean property value that specifies whether the connection may be pooled or nonpooled. (Inherited from ConnectionSettings.)
Public propertyPacketSizeGets or sets the packets of data sent between the client and the server over the network in bytes. (Inherited from ConnectionSettings.)
Public propertyPasswordGets or sets the password used with the logon to establish a connection with the server when SQL Server Authentication is used. (Inherited from ConnectionSettings.)
Public propertyPooledConnectionLifetimeGets or sets the lifetime of the pooled connection. (Inherited from ConnectionSettings.)
Protected propertyResetConnectionStringGets or sets a Boolean value that specifies whether a node in the connection string has been changed. (Inherited from ConnectionSettings.)
Public propertySecureConnectionStringGets or sets an encrypted version of the connection string. (Inherited from ConnectionSettings.)
Public propertySecurePasswordGets or sets the secure password used with the logon to establish a connection with the server when SQL Server Authentication is used. (Inherited from ConnectionSettings.)
Public propertyServerInstanceGets or sets the name of the server. (Inherited from ConnectionSettings.)
Public propertyServerVersionGets the version of the connected instance of SQL Server.
Public propertySqlConnectionObjectGets the connection object.
Public propertyWorkstationIdGets or sets the ID value that uniquely identifies the workstation. (Inherited from ConnectionSettings.)
Top

  NameDescription
Protected methodCheckServerVersionChecks the version of the target instance of SQL Server.
Public methodConnectConnects to the instance of SQL Server.
Public methodDisconnectDisconnects from the instance of SQL Server.
Public methodEquals (Inherited from Object.)
Protected methodExecuteTSqlExecutes a Transact-SQL command.
Protected methodFinalize (Inherited from Object.)
Public methodForceDisconnectedForces a disconnect from the instance of SQL Server.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodThrowIfPropertyNotSet(String, String)Throws an exception if the specified connection property is null or empty. (Inherited from ConnectionSettings.)
Protected methodThrowIfPropertyNotSet(String, String, Boolean)Throws an exception if the specified connection property is null or, optionally, empty. (Inherited from ConnectionSettings.)
Public methodToStringReturns the referenced object name as a string. (Inherited from ConnectionSettings.)
Top

  NameDescription
Public eventInfoMessageThe event that occurs when the instance of SQL Server generates an informational message. 
Public eventRemoteLoginFailedThis event occurs when a remote login fails to connect to the instance of SQL Server.
Public eventServerMessageThe event that occurs when SQL Server returns a warning or informational message on the current connection.
Public eventStateChangeThe event that occurs when the instance of SQL Server changes state. 
Public eventStatementExecutedThe event that occurs when the instance of SQL Server executes a statement on the current connection. 
Top

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

Community Additions

ADD
Show:
© 2014 Microsoft