sp_helpsegment

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

Syntax

sp_helpsegment [segname]

Parameters

Examples

Usage

There are additional considerations when using sp_helpsegment:
  • sp_helpsegment displays information about the specified segment, when segname is given, or about all segments in the current database, when no argument is given.

  • When you first create a database, the SAP ASE server automatically creates the system, default, and logsegment segments. Use sp_addsegment to add segments to the current database.

  • If you specify a log segment from a dedicated log database for the segname parameter, sp_helpsegment reports the number of free pages in the log segment.

  • The system, default, and logsegment segments are numbered 0, 1, and 2, respectively.

  • The “status” column indicates which segment is the default pool of space. Use sp_placeobject or the on segment_name clause of the create table or create index command to place objects on specific segments.

  • The “indid” column is 0 if the table does not have a clustered index and is 1 if the table has a clustered index.

See also create index, create table in Reference Manual: Commands.

Permissions

Any user can execute sp_helpsegment. Permission checks do not differ based on the granular permissions settings.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • 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

Related reference
sp_addsegment
sp_dropsegment
sp_extendsegment
sp_helpdb
sp_helpdevice
sp_placeobject