Spazio dei nomi Microsoft.SqlServer.Management.Common

The [Microsoft.SqlServer.Management.Common] namespace contains classes that provide connection functionality to the other SQL Server management namespaces.

The Microsoft.SqlServer.Management.Common namespace contains the classes that are used to establish a connection to an instance of Motore di database di SQL Server. The most important class in this namespace is the ServerConnection class. The ServerConnection object lets you manage the connection to the instance of the Motore di database. It is referenced by various classes in the other manageability namespaces.

The Microsoft.SqlServer.Management.Common namespace resides in the Microsoft.SqlServer.ConnectionInfo.dll assembly file.

By using the Microsoft.SqlServer.Management.Common namespace, you can do the following:

  • Connect to an instance of SQL Server.

  • Control the connection settings.

  • Run Transact-SQL statements directly.

  • Capture the Transact-SQL statements that are generated by the SMO program.

  • Manage transactions.

Classi

  Classe Descrizione
Classe pubblica CapturedSql The CapturedSql class represents the Transact-SQL commands that are sent to the instance of SQL Server by way of the referenced connection. However, they are then redirected to a buffer instead of running immediately on the instance of SQL Server.
Classe pubblica ChangePasswordFailureException The ChangePasswordFailureException class is an exception that is raised when an unsuccessful attempt is made to change the password of the login that establishes a connection with the instance of SQL Server by using SQL Server Authentication.
Classe pubblica ConnectionCannotBeChangedException The ConnectionCannotBeChangedException class is an exception that is raised when an unsuccessful attempt is made to change the connection to the instance of Microsoft SQL Server.
Classe pubblica ConnectionException The ConnectionException class is an exception that is raised when an error occurs on the connection to the instance of SQL Server.
Classe pubblica ConnectionFailureException The ConnectionFailureException class is an exception that is raised when an unsuccessful attempt is made to establish a connection with the instance of SQL Server.
Classe pubblica ConnectionInfoBase The ConnectionInfoBase object is a base class that is used in the construction of the SqlOlapConnectionInfoBase class and it represents information used to connect to an instance of SQL Server.
Classe pubblica ConnectionManager The ConnectionManager class manages the connection to an instance of SQL Server.
Classe pubblica ConnectionSettings The ConnectionSettings class represents the settings used by a connection to an instance of a server, such as SQL Server. The ServerConnection class inherits ConnectionSettings class.
Classe pubblica DataTransferEventArgs The DataTransferEventArgs class represents the arguments used when a data transfer event is raised.
Classe pubblica DataTransferProgressEventArgs The DataTransferProgressEventArgs class represents the arguments used when a data transfer progress event is raised.
Classe pubblica DisconnectedConnectionException The DisconnectedConnectionException class is an exception that is raised when a connection is closed.
Classe pubblica ExecutionFailureException The ExecutionFailureException class is an exception that is raised when an execution failure is encountered on the connection to the server.
Classe pubblica InvalidArgumentException Eccezione generata quando un parametro non valido viene passato a un metodo nella connessione al server a cui si fa riferimento.
Classe pubblica InvalidPropertyValueException The exception that is raised when a property is set to a value that is not valid on the referenced connection to the server.
Classe pubblica NotInTransactionException The exception that is raised when an error occurs within a transaction on the referenced connection to the server.
Classe pubblica OlapConnectionInfo This class supports the SMO infrastructure and is not intended to be used directly from your code.
Classe pubblica PropertyNotAvailableException The exception that is raised when an unavailable property is requested on the connection to the server.
Classe pubblica PropertyNotSetException The exception that is raised when a process requests a property that has not been set on the connection to the server.
Classe pubblica ServerComparer Represents the comparer class.
Classe pubblica ServerConnection The ServerConnection object represents a connection to a server.
Classe pubblica ServerMessageEventArgs The ServerMessageEventArgs class represents the arguments used when a server message event is raised.
Classe pubblica ServerVersion La classe ServerVersion rappresenta le informazioni sulla versione per il server.
Classe pubblica SqlConnectionInfo The SqlConnectionInfo object represents information that is required to establish a connection to an instance of SQL Server.
Classe pubblica SqlOlapConnectionInfoBase The SqlOlapConnectionInfoBase class represents information used to connect to the instance of SQL Server.
Classe pubblica SqlServerManagementException The SqlServerManagementException class is an exception that is raised when a SQL Server management error is encountered on the connection to the server.
Classe pubblica StatementEventArgs The StatementEventArgs class represents the arguments used when a statement event is raised.
Classe pubblica TransferException The TransferException class is an exception that is raised when a SQL Server transfer error is encountered on the connection to the server.

Interfacce

  Interfaccia Descrizione
Interfaccia pubblica IAlterable Defines a method to alter an object on the referenced connection.
Interfaccia pubblica ICreatable Defines a method to create an object on the referenced connection.
Interfaccia pubblica IDataTransferProvider Defines methods and events for data transfers on the referenced connection.
Interfaccia pubblica IDroppable Defines a method to Drop an object on the referenced connection.
Interfaccia pubblica IMarkForDrop Defines a method that marks an object to be dropped.
Interfaccia pubblica IRefreshable Defines a method to refresh an object from the server on the referenced connection.
Interfaccia pubblica IRenamable Defines the Rename method on the referenced connection.
Interfaccia pubblica IRestrictedAccess Represents an interface that implements single-user access to the server for the referenced connection.
Interfaccia pubblica ISfcConnection Defines high-level properties and methods for server connections.
Interfaccia pubblica ITransferMetadataProvider Defines methods that are required for transferring metadata on the referenced connection.

Delegati

  Delegato Descrizione
Delegato pubblico DataTransferEventHandler La classe DataTransferEventHandler rappresenta il metodo che gestisce l'evento generato dal processo di trasferimento dei dati.
Delegato pubblico DataTransferProgressEventHandler Rappresenta il metodo che gestisce gli eventi generati dal processo di segnalazione dello stato di avanzamento di trasferimento dei dati.
Delegato pubblico ServerMessageEventHandler The ServerMessageEventHandler class represents the method that handles the event raised by a server message.
Delegato pubblico StatementEventHandler The StatementEventHandler class represents the method that handles the event raised by a statement.

Enumerazioni

  Enumerazione Descrizione
Enumerazione pubblica AutoDisconnectMode Contains values that are used to specify the automatic disconnection options for a connection to an instance of SQL Server.
Enumerazione protetta ConnectionManager. . :: . .ExecuteTSqlAction Execute a Transact-SQL action.
Enumerazione pubblica ConnectionType The ConnectionType enumeration contains values that are used to specify the type of server with which the connection is established.
Enumerazione pubblica DatabaseEngineType Database engine type of stand-alone instance of SQL Server or SQL Azure Database.
Enumerazione pubblica DataTransferEventType The DataTransferEventType enumeration contains values that are used to specify the type of data transfer event.
Enumerazione pubblica DataTransferProgressEventType The DataTransferProgressEventType enumeration contains values that are used to specify the type of data transfer progress event.
Enumerazione pubblica DeferredUseMode The DeferredUseMode enumeration contains values that specify how that deferred use can be instructed to handle Transact-SQL statements on the server connection. 
Enumerazione pubblica ExecutionTypes The ExecutionTypes enumeration contains values that are used to specify execution options for the Transact-SQL commands sent to the server using the referenced connection.
Enumerazione pubblica FixedServerRoles The FixedServerRoles enumeration contains values that are used to specify fixed server roles that can be assigned to logons.
Enumerazione pubblica NetworkProtocol Contains values that are used to specify network protocols used on the network where the referenced connection is established.
Enumerazione pubblica QueryParameterizationMode L'enumerazione QueryParameterizationMode contiene valori utilizzati per specificare il modo in cui le query con parametri vengono gestite dalla connessione al server.
Enumerazione pubblica ServerCaseSensitivity Contains values that are used to specify whether the server is sensitive to the case (lower or upper) of text.
Enumerazione pubblica ServerType L'enumerazione ServerType contiene valori che specificano i diversi tipi di servizi SQL Server.
Enumerazione pubblica ServerUserProfiles L'enumerazione ServerUserProfiles contiene i valori utilizzati per specificare i profili utente sul server.
Enumerazione pubblica SqlExecutionModes The SqlExecutionModes enumeration contains values that are used to specify whether the commands sent to the referenced connection to the server are executed immediately or saved in a buffer.