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

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

sp_placeobject segment3, authors

Example 2

This command 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

Only the table owner, Database Owner, or System Administrator can execute sp_placeobject.

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