sp_dropdevice

Drops an SAP ASE database device or dump device.

Syntax

sp_dropdevice logicalname

Parameters

Examples

Usage

There are additional considerations when using sp_dropdevice:
  • sp_dropdevice drops a device from SAP ASE, deleting the device entry from master.dbo.sysdevices.

  • sp_dropdevice does not remove a file that is being dropped as a database device; it makes the file inaccessible to SAP ASE. To delete a file after using sp_dropdevice, use operating system commands.

See also drop database in Reference Manual: Commands.

Permissions

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

SettingDescription
Enabled

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

Disabled

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

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_addumpdevice
sp_helpdb
sp_helpdevice