Creating your own resource control table
You can create your own table or rename Q.RESOURCE_TABLE.
About this task
You can include additional columns in the table you create if Q.RESOURCE_VIEW is the view defined on this table and the table includes the columns structure of the Q.RESOURCE_TABLE table.
To create your own resource table, follow these steps. These example SQL statements create a table called MY_RESOURCES. Substitute your own table, column, and table space names in the statement.
- Erase Q.RESOURCE_TABLE from the database with a statement
like the following, because Q.RESOURCE_VIEW is defined on this table:
DROP TABLE Q.RESOURCE_TABLE
- Re-create the table. Under TSO, substitute your own table space name for DSQTSSN1.
- If you do not use the table space supplied with QMF, you must create your own. If you rebind the QMF application plan explicitly, you also need the BIND privilege on the plan.
- Redefine Q.RESOURCE_VIEW as a view on the new table, MY_RESOURCES.
Always re-create Q.RESOURCE_VIEW if you decide to use a table other than Q.RESOURCE_TABLE or decide to give Q.RESOURCE_TABLE a different name, because QMF queries the view, not the table, to obtain resource control information to pass to the governor exit routine.
The following example shows how to redefine Q.RESOURCE_VIEW as a view on the new table, MY_RESOURCES. Substitute your own table and column names for those in the example.
CREATE VIEW Q.RESOURCE_VIEW (RESOURCE_GROUP, RESOURCE_OPTION, INTVAL, FLOATVAL, CHARVAL) AS SELECT GROUPNAME, CONSTRAINT, INTEGER, FLOAT_VALUE, CHARACTER FROM MY_RESOURCES
- Grant the SELECT privilege on Q.RESOURCE_VIEW to PUBLIC.
- Test the new view; you can test the view using SPUFI. Finally, rebind the QMF application plan.