sp_placeobject

Description

Puts future space allocations for a table or index on a particular segment.

Syntax

sp_placeobject segname, objname

Parameters

segname

is the name of the segment on which to locate the table or index.

objname

is the name of the table or index for which to place subsequent space allocation on the segment segname. Specify index names in the form “tablename.indexname

Examples

Example 1

Places all subsequent space allocation for the table authors on the segment named “segment3”:

sp_placeobject segment3, authors

Example 2

Places all subsequent space allocation for the employee table’s index named employee_nc on the segment named indexes:

sp_placeobject indexes, 'employee.employee_nc'

Usage

Permissions

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

Granular permissions enabled

With granular permissions enabled, you must be the table owner or a user with manage database privilege.

Granular permissions disabled

With granular permissions disabled, you must be the database owner, table owner, or a user with sa_role.

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 alter table, dbcc

System procedures sp_addsegment, sp_dropsegment, sp_extendsegment, sp_helpindex, sp_helpsegment