sp_dropobjectdef

Description

(Component Integration Services only) Deletes the external storage mapping provided for a local object.

Syntax

sp_dropobjectdef tablename

Parameters

tablename

has the form dbname.owner.object, where:

  • dbname is the name of the database containing the object whose storage location 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 whose storage location 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.

Examples

Example 1

Deletes the entry from sysattributes that provided the external storage mapping for a table known to the server as the colleges table in database personnel:

sp_dropobjectdef "personnel.dbo.colleges"

Example 2

Deletes the entry from sysattributes that provided the external storage mapping for the andrea.fishbone object, where andrea is the owner and the local table name is fishbone:

sp_dropobjectdef "andrea.fishbone"

Usage

Permissions

Only the database owner or a system administrator can execute sp_dropobjectdef. Only a system administrator can execute sp_dropobjectdef to remove mapping information for another user’s object.

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 create existing table, create table, drop table

System procedures sp_addobjectdef