Previous Topic: Synchronization Control Statement DescriptionsNext Topic: Specifying GRANT TO PUBLIC Control Statements


Examples Of Synchronization Control Statements

To provide an example of a synchronization control statement, let’s assume that you want to synchronize the DB2 catalog for the DSNP subsystem. You want to include all users in department 120, the customer and accounts payable tables, and a special accounts payable table that is named ACCT.XREF. Additionally, you want to revoke access to these tables for any user that is not in department 120. Finally, you want to see trace reports for this synchronization.

Your keyword values are:

To achieve the results described above, create these synchronization control statements:

SYNC SYSTEM(DSNP) OPTIONS(REVOKEALL,TRACE)
INCLUDE UID(***120)
INCLUDE TBL(CUST‑)
INCLUDE TBL(ACCTPAY‑)
INCLUDE TBL(ACCT.XREF)

The trace reports list the users and tables that are actually included in the synchronization and the DB2 catalog and CA ACF2 Option for DB2 privileges that existed for these users and tables before the synchronization.

After reviewing the above statement, perhaps you realize that you need to make a couple of modifications:

  1. First, you do not want to include project leaders in the synchronization. Project leaders have the LEADER bit turned on in their logonid records.
  2. Second, let’s drop REVOKEALL because not every user who has access to the synchronized tables is included in this synchronization.

Here are the revised synchronization control statements that reflect your additional needs:

SYNC SYSTEM(DSNP) OPTIONS(TRACE)
INCLUDE UID(***120)
EXCLUDE IF(LEADER)
INCLUDE TBL(CUST‑)
INCLUDE TBL(ACCTPAY‑)
INCLUDE TBL(ACCT.XREF)