Example of privileges on the diagnostics table

The following example illustrates how the initial set of privileges on a diagnostics table is derived from the current set of privileges on the target table.

For example, assume that a table called cust_subset consists of the following columns: ssn (customer's social security number), fname (customer's first name), lname (customer's last name), and city (city in which the customer lives).

The following set of privileges exists on the cust_subset table:
  • User alvin is the owner of the table.
  • User barbara has the Insert and Index privileges on the table. She also has the Select privilege on the ssn and lname columns.
  • User carrie has the Update privilege on the city column. She also has the Select privilege on the ssn column.
  • User danny has the Alter privilege on the table.
Now user alvin starts a violations table named cust_subset_viols and a diagnostics table named cust_subset_diags for the cust_subset table, as follows:
START VIOLATIONS TABLE FOR cust_subset
   USING cust_subset_viols, cust_subset_diags;
The database server grants the following set of initial privileges on the cust_subset_diags diagnostics table:
  • User alvin is the owner of the diagnostics table, so he has all table-level privileges on the table.
  • User barbara has the Insert, Delete, Select, and Index privileges on the diagnostics table.
  • User carrie has the Insert, Delete, Select, and Update privileges on the diagnostics table.
  • User danny has no privileges on the diagnostics table.