Granting privileges
You can grant (create new) privileges for any of the object types listed on the Manage Db2® Privileges panel.
To grant one or more privileges for an object, you can use any of the following methods:
- Method 1 (specifying the object using the grant privileges panel):
- On the Manage Db2® Privileges
panel:
- Type the required details (if any) in the Object Identification Criteria section.
- Type the appropriate number in the Object Type selection field to select the object type you want, or use the default value, 3 (table).
- Type
G
on the command line. - Press Enter.
The grant privileges panel for the specified object type is displayed. The panel lists each privilege type, with a corresponding selection entry field, that can apply to the object type.
On the grant privileges panel:
- Select the privileges you want to grant by entering
Y
orG
in the corresponding selection fields. - In the entry field (or fields) provided, specify the name of the object.
- In the To entry field, specify the SQLID of the user to whom the privileges are to be granted (the grantee).
- Press Enter.
- Select the privileges you want to grant by entering
- On the Manage Db2® Privileges
panel:
- Method 2 (specifying the object from a privilege display panel):
Note: This method only works if there are already privileges for the Db2® object. If not, FM/Db2 issues the message “No rows selected”.
- On the Manage Db2® Privileges
panel,
- Type the required details (if any) in the Object Identification Criteria section.
- Type the appropriate number in the Object Type selection field to select the object type you want, or use the default value, 3 (table).
- Leave the command line blank.
- Press Enter. The privilege display panel for the specified object type is displayed listing the selected objects.
- On the privilege display panel, type
G
in the Cmd field against the object for which you want to grant privileges. - Press Enter. The grant privileges panel for the specified object
is displayed. Note: If you use this method to navigate to the grant privileges panel for the specified object type, the following details are pre-entered:
- The existing setting for each privilege type (Y, G, or blank)
- The name details for the object
- The SQLID of the user to whom the existing privileges are granted (the grantee)
On the grant privileges panel:
- Select the privileges you want to grant by entering
Y
orG
in the corresponding selection fields. - Press Enter.
- On the Manage Db2® Privileges
panel,
- Method 3 (using the Object List utility):
- Use the utility function, Object List (option 3.4), to display a list of the type of objects you want.
- On the object list panel for the selected object type, type
G
in the Cmd field against the object for which you want to grant privileges. - Press Enter.
The grant privileges panel for the specified object type is displayed (as for Method 1). The panel lists each privilege type, with a corresponding selection entry field, that can apply to the object type.
- Follow the remaining steps as for Method 1 (3.a to 3.d)
If the grant privilege processing is successful, FM/Db2 displays a message indicating that the grant ran successfully. Otherwise, a panel is displayed showing the formatted SQL return code.
Related tasks
Related references