Export (0) Print
Expand All
Expand Minimize

sp_dropdevice

SQL Server 2000

Drops a database device or backup device from Microsoft® SQL Server™, deleting the entry from master.dbo.sysdevices.

Syntax

sp_dropdevice [ @logicalname = ] 'device'
    [ , [ @delfile = ] 'delfile' ]

Arguments

[@logicalname =] 'device'

Is the logical name of the database device or backup device as listed in master.dbo.sysdevices.name. device is sysname, with no default.

[@delfile =] 'delfile'

Is whether or not the physical backup device file should be deleted. delfile is varchar(7). If specified as DELFILE, the physical backup device disk file is deleted.

Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

sp_dropdevice cannot be used inside a transaction.

Permissions

Execute permissions default to members of the sysadmin and diskadmin fixed server roles.

Examples

This example drops the TAPEDUMP1 tape dump device from SQL Server.

sp_dropdevice 'TAPEDUMP1'

See Also

DROP DATABASE

sp_addumpdevice

sp_helpdb

sp_helpdevice

System Stored Procedures

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft