sp_dropdevice

Description

Drops an Adaptive Server database device or dump device.

Syntax

sp_dropdevice logicalname

Parameters

logicalname

is the name of the device as listed in master.dbo.sysdevices.name.

Examples

Example 1

Drops the device named tape5 from Adaptive Server:

sp_dropdevice tape5

Example 2

Drops the database device named fredsdata from Adaptive Server. The device must not be in use by any database:

sp_dropdevice fredsdata

Usage

Permissions

Only a system administrator can execute sp_dropdevice.

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 drop database

System procedures sp_addumpdevice, sp_helpdb, sp_helpdevice