SCH_PRIVILEGES table

The SCH_PRIVILEGES table describes privileges where the grantee is an individual user and the target is an entire schema.

The clustering key consists of TABLE_UID, GRANTOR, GRANTOR_TYPE, GRANTEE, GRANTEE_TYPE, and PRIVILEGE_TYPE. The layout of the SCH_ PRIVILEGES table is identical to that of the SCH_GROUP_PRIVILEGES, TBL_GROUP_PRIVILEGES, and TBL_PRIVILEGES tables.

This table is is supported from SQL/MX 3.5 onwards.

Column number

Column Name

Data Type

Description

1*

GRANTOR

INT

If GRANTOR_TYPE is U or O, authorization ID of grantor or owner if grantor is super ID acting for owner. There is no meaning for other values.

2*

GRANTOR_TYPE

CHAR(2)

The values are:

S - system grant

U - user grant

O - granted as schema owner

3*

GRANTEE

INT

If GRANTEE_TYPE is U or O, the authorization ID of grantee. The column has no meaning otherwise.

4*

GRANTEE_TYPE

CHAR(2)

The values are:

P - public grant

U - user grant

O - grantee is schema owner

5*

TABLE_UID

LARGEINT

The UID of the schema label object in the target schema.

6*

PRIVILEGE_TYPE

CHAR(2)

Privilege types are:

A - ALTER

C - CREATE

D - DELETE

D - R DROP

E - EXECUTE

I - INSERT

R - REFERENCES

S - SELECT

SU - USAGE

U - UPDATE

7

IS_GRANTABLE

CHAR(2)

The value is Y if granted with grant option and N if not.

* Indicates primary key