Previous Topic: DB2SYSNext Topic: DB2TABSP


DB2TABLE

Description

Identifies DB2 tables or views and, optionally, their columns.

TSS Commands

The following TSS commands can be used with the DB2TABLE keyword: CREATE, DELETE, ADDTO, REMOVE, PERMIT, REVOKE, ADMIN, DEADMIN, WHOOWNS, WHOHAS.

TSS ADDTO or REMOVE

Syntax
TSS ADD(acid) DB2TABLE(userid.table/view,userid.table/view,...)
Prefix length

2‑26 characters

Capacity of list

1‑5 DB2 tables or views or prefixes per TSS command.

Authority

Administrators must have DB2TABLE(OWN) authority.

Masking

The DB2TABLE resource class supports all masking characters.

Types

The DB2TABLE keyword is used with the following ACID types: User, Profile, Department, Division, Zone, DCA, VCA, ZCA, LSCA, SCA, MSCA.

TSS PERMIT or REVOKE

Syntax
TSS PER(acid) DB2TABLE(userid.table/view prefix(es)| userid.table/view.column)
Table name

2‑255 characters

Capacity of list

1‑5 tables or views or prefixes per TSS command.

Accesses

The administrator can specify any or all of the following accesses: ALTER, CREATE, DELETE, INDEX, INSERT, REFER, SELECT, TRIGGER, UPDATE, ALL, NONE. The default access is SELECT.

Note: CREATE access only applies to view.

Access Controls

The administrator can use any of the following methods to control access to tables or views: Expiration, Facility, Time/Day, Actions.

Types

The DB2TABLE keyword is used with the following ACID types: User, Profile, DCA, VCA, ZCA, LSCA, SCA, MSCA.

TSS ADMIN or DEADMIN

Syntax
TSS ADMIN(acid) DB2TABLE(authority level(s))
Authority

Administrators can specify any or all of the following authority levels: OWN, XAUTH, AUDIT, INFO, REPORT, ALL.

Types

The DB2TABLE keyword is used with the following ACID types: User, DCA, VCA, ZCA, LSCA, SCA, MSCA.

Examples

TSS ADDTO/REMOVE

To give the Payroll Department (PAYDEPT) ownership of the table USRMIKE.PAYR the administrator enters:

TSS ADD(PAYDEPT) DB2TABLE(USRMIKE.PAYR)

Ownership of the table USRMIKE.PAYR is removed by entering:

TSS REMOVE(PAYDEPT) DB2TABLE(USRMIKE.PAYR)
TSS PERMIT/REVOKE

The administrator wants to authorize USRMARE to select the social security information on table USRMIKE.PAYR. He enters:

TSS PERMIT(USRMARE) DB2TABLE(USRMIKE.PAYR) ACCESS(SELECT)

To revoke USRMARE's authority to table USRMIKE.PAYR, he enters:

TSS REVOKE(USRMARE) DB2TABLE(USRMIKE.PAYR)

Note: As illustrated in the next example, you can also restrict a user's ability to update specifically‑named columns in a table.

The administrator wishes to authorize USRGAB with update privilege so that she can correct any errors in the start‑date column on table USRMIKE.PAYR. The administrator enters:

TSS PERMIT(USRGAB) DB2TABLE(USRMIKE.PAYR.STRTDTE) ACCESS(UPDATE)

To revoke USRGAB's authority to table USRMIKE.PAYR, he enters:

TSS REVOKE(USRGAB) DB2TABLE(USRMIKE.PAYR)
TSS ADMIN/DEADMIN

To give administrator PAYVCA the ability to assign ownership of a table, to permit users to access tables and views within his scope, and to audit use of this resource, he enters:

TSS ADMIN(PAYVCA) DB2TABLE(OWN,XAUTH,AUDIT)

To remove PAYVCA's authority for tables and views, the administrator enters:

TSS DEADMIN(SFTVCA) DB2TABLE(OWN,XAUTH,AUDIT)
TSS WHOHAS

To determine who has access to the table USRMIKE.PAYRP, the administrator enters:

TSS WHOHAS DB2TABLE(USRMIKE.PAYR)

CA Top Secret will respond by displaying all of the ACIDs that have access to this particular table.

TSS WHOOWNS

To determine who owns the table USRMIKE.PAYR, the administrator enters:

TSS WHOOWNS DB2TABLE(USRMIKE.PAYR)