sysattributes

All databases

Description

System attributes define properties of objects such as databases, tables, indexes, users, logins, and procedures. sysattributes contains one row for each of an object’s attribute definitions (configured by various system procedures). master..sysattributes defines the complete set of valid attribute values and classes for Adaptive Server as a whole. It also stores attribute definitions for server-wide objects, such as databases and logins.

sysattributes should only be accessed indirectly using system procedures. The permissions required for modifying sysattributes depend on the system procedure you use.

Columns

The columns for sysattributes are:

Name

Datatype

Description

class

smallint

The attribute class ID. This describes the category of the attribute. In master..sysattributes, the special class 1 identifies all valid attributes for Adaptive Server. Class 0 identifies valid classes of attributes.

attribute

smallint

The attribute ID.

object_type

char(2)

A one- or two-letter character ID that defines the type of object to associate with the attribute.

object_cinfo

varchar(30) null

A string identifier for the object (for example, the name of an application). This field is not used by all attributes.

object

int null

The object identifier. This may be an object ID, user ID, or database ID, depending on the type of object. If the object is a part of a table (for example, an index), then this column contains the object ID of the associated table.

object_info1

int null

Defines additional information required to identify the object. This field is not used by all attributes. The contents of this field depend on the attribute that is defined.

object_info2

int null

Defines additional information required to identify the object. This field is not used by all attributes. The contents of this field depend on the attribute that is defined.

object_info3

int null

Defines additional information required to identify the object. This field is not used by all attributes. The contents of this field depend on the attribute that is defined.

int_value

int null

An integer value for the attribute (for example, the display level of a user).

char_value

varchar(255) null

A character value for the attribute (for example, a cache name).

text_value

text null

A text value for the attribute.

image_value

image null

An image value for the attribute.

comments

varchar(255) null

Comments or additional information about the attribute definition.

Table 1-1 shows the representation of temporary database groups and bindings as these appear in the sysattributes system table. Only relevant columns are shown. All other columns are NULL. Groups are represented in rows where attribute has a value of “0”. Login and application bindings, as well as database to group bindings, are represented in rows where attribute has a value of “1”. See Chapter 12, “Multiple Temporary Databases” in Performance and Tuning: Optimizer for more information about multiple temporary databases.

Table 1-1: sysattributes representation

class

attribute

object_type

object_cinfo

object

object_cinfo1

int_value

char_value

16

0

GR

group name

NULL

NULL

group id

NULL

16

0

D

database name

group ID

NULL

NULL

NULL

16

1

LG

NULL

user ID

0 for soft, 1 for hard

0 for database, 1 for group

database or group name

16

1

AP

application name

NULL

0 for soft, 1 for hard

0 for database, 1 for group

database or group name

Indexes

Unique clustered index On class, attribute, object_type, object, object_info1, object_info2, object_info3, object_cinfo.

Nonclustered index On object_type, object, object_info1, object_info2, object_info3, object_cinfo.