(Contents)(Previous)(Next)

Privileges

The current user wants information about the privileges he has on his own tables and that of other users.

The display shows the owner, the table and column names, the privileges for these tables, and the users who granted privileges, if any, to the current user. If the user has the right to grant these privileges, a '+' following the corresponding abbreviation indicates this.

The user 'travel10' wants to display such a list of privileges. He enters the following statement (before 'travel20' revokes the privileges from him):

SELECT refowner owner,

reftablename tablename,

refcolumnname columnname,

privileges,

defusername grantor,

FROM domain.usr_uses_col

WHERE refowner like 'TRAVEL*'

The user 'travel10' can see all privileges he has granted directly or indirectly. These privileges are related to the corresponding tables on display.

Indirect granting of privileges means that the current user gave other users the right to grant privileges for his tables to third users. The user who granted a privilege is indicated in the result table as GRANTOR.

'travel10' wants to know the privileges he has granted for the table 'customer'. He enters:

SELECT refowner owner,

reftablename tablename,

refcolumnname columnname,

privileges,

defusername grantor

FROM domain.usr_uses_col

WHERE defusername = 'TRAVEL10'

AND refowner = 'TRAVEL10'

AND reftablename = 'CUSTOMER'


(Contents)(Previous)(Next)