sp_autoconnect

Description

Component Integration Services only Defines a passthrough connection to a remote server for a specific user, which allows the named user to enter passthrough mode automatically at login.

Syntax

sp_autoconnect server, {true | false} [, loginame]

Parameters

server

is the name of a server to which an automatic passthrough connection is made. server must be the name of a remote server already added by sp_addserver. This server cannot be the local server.

true | false

determines whether the automatic passthrough connection is enabled or disabled for server. true enables the automatic connection. false disables it.

loginame

specifies the name of the user for which automatic connection is required. If no loginame is supplied, the autoconnect status is modified for the current user.

Examples

Example 1

The current user is automatically connected to the server SYBASE the next time that user logs in. The user’s connection is placed in passthrough mode:

sp_autoconnect SYBASE, true

Example 2

Disables the autoconnect feature for the user “steve”:

sp_autoconnect SYBASE, false, steve

Usage

Permissions

Only a System Administrator can execute sp_autoconnect.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

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

See also

Commands connect to...disconnect, grant

System procedures sp_addlogin, sp_addserver, sp_passthru, sp_remotesql