connect to...disconnect

Description

(Component Integration Services only) Connects to the specified server and disconnects the connected server.

Syntax

This syntax is sent to Adaptive Server verbatim. Use this syntax with CIS to create a passthru to a different server:

connect to server_name
disconnect
	[from ASE]
	[all]
	[connection_name]

This syntax opens a new JDBC-level connection to Adaptive Server, and does not use CIS. You can specify the arguments in any order. If you do not include arguments, Adaptive Server prompts you for connection parameters:

connect
	[to ASE engine_name]
	[database database_name]
	[as connection_name]
	[user user_id]
	[identified by password]]]

This syntax opens a new JDBC-level connection to Adaptive Server. This syntax does not use CIS:

connect using connect_string

Parameters

server_name

is the server to which a passthrough connection is required.

from ASE

disconnects from the current Adaptive Server.

all

disconnects from all Adaptive Servers.

connection_name

disconnects from the specified connection.

engine_name

connects to the specified engine.

database_name

connects to the specified database.

connection_name

connects to the configured connection.

user_id

connects to the user with this ID.

connection_string

connects using a predetermined connection string.

Examples

Example 1

Establishes a passthrough connection to the server named SYBASE:

connect to SYBASE

Example 2

Disconnects the connected server:

disconnect 

Example 3

Disconnects from all servers:

disconnect all

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

You must have the connect privilege to use the connect to command..

Auditing

Values in event and extrainfo columns of sysaudits are:

Event

Audit option

Command or access audited

Information in extrainfo

90

security

connect to

  • Roles – current active roles

  • Keywords or optionsconnect to

  • Previous value – NULL

  • Current value – NULL

  • Other information – NULL

  • Proxy information – original login name, if set proxy is in effect

See also

Commands create existing table, grant

System procedures sp_addserver, sp_autoconnect, sp_helpserver, sp_passthru, sp_remotesql, sp_serveroption