sysobjects

All databases

Description

sysobjects contains one row for each table, view, stored procedure, extended stored procedure, log, rule, default, trigger, check constraint, referential constraint, and (in tempdb only) temporary object.

Columns

The columns for sysobjects are:

Name

Datatype

Description

name

sysname

Object name

id

int

Object ID

uid

int

User ID of object owner

type

char(2)

One of the following object types:

  • D = default

  • F = SQLJ function

  • L = log

  • P = Transact-SQL or SQLJ procedure

  • PR = prepare objects (created by Dynamic SQL)

  • R = rule

  • RI = referential constraint

  • S = system table

  • TR = trigger

  • U = user table

  • V = view

  • XP = extended stored procedure

userstat

smallint

Application-dependent type information (32768 decimal [0x8000 hex] indicates to Data Workbench® that a procedure is a report)

sysstat

smallint

Internal status information (256 decimal [0x100 hex] indicates that table is read-only)

indexdel

smallint

Index delete count (incremented if an index is deleted)

schemacnt

smallint

Count of changes in the schema of an object (incremented if a rule or default is added)

sysstat2

int

Additional internal status information (see Table 12-14)

crdate

datetime

Date the object was created

expdate

datetime

Reserved

deltrig

int

Stored procedure ID of a delete trigger if the entry is a table. Table ID if the entry is a trigger.

instrig

int

Stored procedure ID of a table’s insert trigger if the entry is a table

updtrig

int

Stored procedure ID of a table’s update trigger if the entry is a table

seltrig

int

Reserved

ckfirst

int

ID of first check constraint on the table

cache

smallint

Reserved

audflags

int

Object’s audit settings

objspare

int

Spare

versionts

binary

loginame

varchar(30)

Login name of the user who created the object

Table 12-14 lists the bit representations for the sysstat2 column:

Table 12-14: sysstat2 control bits in the sysobjects table

Decimal

Hex

Status

1

0x1

Table has a referential constraint

2

0x2

Table has a foreign key constraint

4

0x4

Table has more than one check constraint

8

0x8

Table has a primary key constraint

16

0x10

Stored procedure can execute only in chained transaction mode

32

0x20

Stored procedure can execute in any transaction mode

64

0x40

Table has an IDENTITY field

512

0x200

Table does not contain variable-length columns

1024

0x400

Table is remote

2048

0x800

Table is a proxy table created with the existing keyword

8192

0x2000

Table uses allpages locking scheme

16384

0x4000

Table uses datapages locking scheme

32768

0x8000

Table uses datarows locking scheme

65536

0x10000

Table was created in a version 11.9 or later version of the server

131072

0x20000

Table has a clustered index

242144

0x40000

Object represents an Embedded SQL procedure

33554432

0x2000000

Object represents a SQLJ stored procedure.

16777216

0x01000000

Object represents an access rule.

67108864

0x04000000

Object represents an OR access rule.

Indexes

Unique clustered index On id

Unique nonclustered index On name, uid