(Component Integration Services only) Connects to the specified server and disconnects the connected server.
connect to server_name disconnect [from ASE] [all] [connection_name]
connect [to ASE engine_name] [database database_name] [as connection_name] [user user_id] [identified by password]]]
connect using connect_string
connect to MYSERVER
disconnect
disconnect all
connect to specifies the server to which a passthrough connection is required. Passthrough mode enables you to perform native operations on a remote server.
server_name must be the name of a server in the sysservers table, with its server class and network name defined.
A remote login alias described in sysattributes, if present
The user’s name and password
In either case, if the connection cannot be made to the specified server, the SAP ASE server returns an error message.
After making a passthrough connection, CIS bypasses the Transact-SQL parser and compiler when subsequent language text is received. It passes statements directly to the specified server, and converts the results into a form that can be recognized by the Open Client interface and returned to the client program.
To close the connection created by the connect to command, use the disconnect command. You can use this command only after the connection has been made using connect to.
You can abbreviate the disconnect command to disc.
The disconnect command returns an error unless connect to has been previously issued and the server is connected to a remote server.
See also sp_addserver, sp_autoconnect, sp_helpserver, sp_passthru, sp_remotesql, sp_serveroption in Reference Manual: Procedures.
ANSI SQL – Compliance level: Transact-SQL extension.
You must have the connect privilege to use the connect to command..
Values in event and extrainfo columns of sysaudits are:
Information | Values |
---|---|
Event | 90 |
Audit option | security |
Command or access audited | connect to |
Information in extrainfo |
|