(Component Integration Services only) Deletes the external storage mapping provided for a local object.
sp_dropobjectdef tablename
dbname is the name of the database containing the object with a storage location that you are dropping. dbname is optional; if present, it must be the current database, and the owner or a placeholder is required.
owner is the name of the owner of the object with a storage location that you are dropping. owner is optional; it is required if dbname is specified.
object is the name of the local table for which external storage mapping is to be dropped.
sp_dropobjectdef "personnel.dbo.colleges"
sp_dropobjectdef "andrea.fishbone"
sp_dropobjectdef deletes the external storage mapping provided for a local object. It replaces sp_droptabledef.
Use sp_dropobjectdef after dropping a remote table with drop table.
Dropping a table does not remove the mapping information from the sysattributes table if it was added using sp_addobjectdef. It must be explicitly removed using sp_dropobjectdef.
object
owner.object
dbname..object
dbname.owner.object
See also create existing table, create table, drop table in Reference Manual: Commands.
The permission checks for sp_dropobjectdef differ based on your granular permissions settings.
Setting | Description |
---|---|
Enabled | With granular permissions enabled, you must be the object owner or a user with drop any table privilege. |
Disabled | With granular permissions disabled, you must be the object owner, the database owner, or a user with sa_role. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|