sp_dropserver

Description

Drops a server from the list of known servers or drops remote logins and external logins in the same operation.

Syntax

sp_dropserver server [, droplogins]

Parameters

server

is the name of the server to be dropped.

droplogins

indicates that any remote logins for server should also be dropped.

Examples

Example 1

This command drops the remote server GATEWAY:

sp_dropserver GATEWAY

Example 2

Drops the entry for the remote server RDBAM_ALPHA and drops all remote logins and external logins for that server:

sp_dropserver RDBAM_ALPHA, droplogins

Usage

Permissions

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

Granular permissions enabled

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

When droplogins is specified, you must be a user with manage any remote login privilege.

Adaptive Server high availablility – You must be a user with manage server privilege and ha_role. When droplogins is specified, you must be a user with manage any remote login privilege.

Adaptive Server shared-disk cluster – You must be a user with manage server and manage cluster privileges. When droplogins is specified, you must be a user with manage any remote login privilege.

Granular permissions disabled

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

Adaptive Server high availablility – You must be a user with sso_role permission and ha_role.

Adaptive Server shared-disk cluster – You must be a user with sso_role and sa_role permission.

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

System procedures sp_addserver, sp_dropremotelogin, sp_helpremotelogin, sp_helpserver