Drops an Adaptive Server database device or dump device.
sp_dropdevice logicalname
is the name of the device as listed in master.dbo.sysdevices.name.
Drops the device named tape5 from Adaptive Server:
sp_dropdevice tape5
Drops the database device named fredsdata from Adaptive Server. The device must not be in use by any database:
sp_dropdevice fredsdata
The sp_dropdevice procedure drops a device from Adaptive Server, 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 Adaptive Server. Use operating system commands to delete a file after using sp_dropdevice.
The permission checks for sp_dropdevice differ based on your granular permissions settings.
| Granular permissions enabled | With granular permissions enabled, you must be a user with manage disk privilege. | 
| Granular permissions disabled | With granular permissions disabled, you must be a user with sa_role. | 
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 | 
 | 
Commands drop database
System procedures sp_addumpdevice, sp_helpdb, sp_helpdevice