sp_autoconnect

(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

Examples

Usage

  • sp_autoconnect defines a passthrough connection to a remote server for a specific user, which allows the named user to enter passthrough mode automatically at login.

  • Use sp_autoconnect only when Component Integration Services is installed and configured.

  • Do not change the autoconnect status of the “sa” login account.

  • Changing the autoconnect status does not occur immediately for users who are currently connected. They must disconnect from the local server, then reconnect before the change is made.

  • Use disconnect to exit passthrough mode.

See also connect to...disconnect, grant in Reference Manual: Commands.

Permissions

The permission checks for sp_autoconnect differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage any login privilege.

Any user can execute sp_autoconnect for themselves.

Disabled

With granular permissions disabled, you must be a user with sa_role.

Any user can execute sp_autoconnect for themselves.

Auditing

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

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • 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

Related reference
sp_addlogin
sp_addserver
sp_passthru
sp_remotesql