To monitor the Db2® resources, a
Db2 user must have the Db2 SYSADM, SYSCTRL, SYSMAINT, and SYSMON authorities for
the monitored instance to view data for some attributes of the Db2 agent.
About this task
To view the monitoring data that the agent collects for all the attributes on the dashboard, the
Db2 user must have specific privileges. To assign
these privileges to the
Db2 user, run the script
file that is present at the following location:
-
install_dir/config/KudGrantUserPermissions.sh
-
install_dir\TMAITM6_x64\KudGrantUserPermissions.bat
A
Db2 user with the SYSADM authority can run
the script to grant privileges to itself or to any other
Db2 user. For a
Db2 instance, use the instance owner, which already has
the SYSADM authority, to run the script to grant other permissions to itself or to grant all the
permissions to any other
Db2 user.
Procedure
-
For local monitoring, refer the following steps.
-
On the system where the Db2 agent in
installed, open the Db2 command-line
interface.
-
Run the following command where instance_name is the name of the Db2 instance and username is the name
of the Db2 user:
-
install_dir/config/KudGrantUserPermissions.sh instance_name
username
-
install_dir\TMAITM6_x64\KudGrantUserPermissions.bat instance_name
username
Note: For Windows systems, username is
optional in the command. If a user name is not specified in the command, the privileges are assigned
to the default user (system).
-
For remote monitoring, refer the following steps.
-
Copy
KudGrantUserPermissions.sh
for Unix or Linux® and KudGrantUserPermissions.bat
for Windows from install_dir/TMAITM6_x64/ from agent workstation to Db2 server machine.
-
Run the following command from Db2 instance
owner user where instance_name is the name of the Db2 instance and username is the name
of the Db2 user:
-
./KudGrantUserPermissions.sh instance_name
username
-
KudGrantUserPermissions.bat instance_name
username
Remember: For remote Db2 monitoring
on Windows, the username must be the
user name that is provided during the Db2 agent configuration at client
workstation.
- On HADR standby database, refer the following steps.
- Copy
KudGrantUserPermissions.sh
for Unix or Linux and
KudGrantUserPermissions.bat
for Windows from install_dir/TMAITM6_x64/ of agent workstation to
Db2 server machine where the primary node of HADR is configured.
- Run the following command from Db2 instance owner user where
instance_name is the name of the Db2 instance and username is
the name of the standby Db2 user:
Windows
KudGrantUserPermissions.bat instance_name username
Linux
./KudGrantUserPermissions.sh instance_name username
- Switch to HADR standby instance to deactivate standby database and re-activate it.
Deactivation and re-activation enable the privilege granting to take effect.