sp_helpsegment System Stored Procedure

Reports information about a particular segment or about all segments in the current database.

Syntax

sp_helpsegment [segname]

where

segname
Specifies the segment about which you want information. If you omit this parameter, information about all segments in the current database is displayed. If the segname is DEFAULT, you must enclose it in quotation marks because the word DEFAULT is a reserved word.

Remarks

Segments are added to the syssegments table in the current database by using the sp_addsegment system procedure.

Example

This example reports information about the SEGMENT3 segment, including which database tables and indexes use that segment.

sp_helpsegment segment3

Permission

Execute permission defaults to the public group.

Tables Used

master.dbo.sysdevices, master.dbo.sysusages, sysindexes, syssegments

See Also

sp_addsegment sp_helpdb
sp_dropsegment sp_helpdevice
sp_extendsegment