PRIVILEGES System Table Description

Description

Contains information about privileges for users and tables in your database.

Fields

Field Type Description

HOLDERTYPE

integer

Indicates the type of the owner of this privilege:

  • Table = 0

  • View = 1

  • Procedure = 2

  • User = 3

  • Role = 4

  • Zone = 5

  • Sequence = 6

  • Domain = 7

  • TempTable = 8

  • Function = 9

Typically this is 3 or 4 for user or role.

HOLDERSCHEMA

varchar(128)

Null for user holders, but role holders will be associated with a schema.

HOLDERNAME

varchar(128)

The name of the owner of this privilege. For example, if the owner type is user, this is the user name.

OBJECTTYPE

integer

Indicates the type of the object on which the privilege is placed.

  • Table = 0

  • View = 1

  • Procedure = 2

  • User = 3

  • Role = 4

  • Zone = 5

  • Sequence = 6

  • Domain = 7

  • TempTable = 8

  • Function = 9

  • Schema = 10

OBJECTSCHEMA

varchar(128)

Name of schema owning the object to which the privilege is granted.

OBJECTNAME

varchar(128)

Name of object to which the privilege is granted.

PRIVILEGEMASK

integer

Specifies the privilege granted to the object specified by OBJECTNAME to the holder specified by HOLDERNAME. This is a bitmap where each bit represents the values in PRIVTYPES ID column (See PRIVTYPES System Table Description):

  • SELECT= 2

  • INSERT= 4

  • UPDATE= 8

  • DELETE= 16

  • GRANT= 32

  • ALTER= 64

  • EXECUTE= 128

  • TRIGGERS= 256

  • PROCEDURES= 512

  • CREATE= 1024

  • GRANT SELECT= 2048

  • GRANT INSERT= 4096

  • GRANT UPDATE= 8192

  • GRANT DELETE= 16384

  • GRANT ALTER= 65536

  • GRANT EXECUTE= 131072

  • GRANT TRIGGERS= 262144

  • GRANT PROCEDURES= 524288

A value of -1 means that all privileges are granted and is set when the holder is the owner of an object.

Indexes

Primary Index: PRIVILEGES..PRIMARY_KEY on fields: HOLDERTYPE, HOLDERSCHEMA, HOLDERNAME, OBJECTTYPE, OBJECTSCHEMA, OBJECTNAME
Secondary Index: OBJECT_PRIVILEGES on fields: OBJECTTYPE, OBJECTSCHEMA, OBJECTNAME