DB2 database authorization

Source: Internet
Author: User

DB2 database authorization is implemented through the GRANT command. After DB2 database authorization, users can perform corresponding operations on DB2.

DB2 database authorization consists of privileged groups and advanced database management program instance-level maintenance and practical operations. Of the five permissions available for DB2, SYSADM, SYSCTRL, and SYSMAINT are instance-level permissions. This means that their range includes instance-level commands and commands for all databases in this instance. These permissions can only be assigned to a group. You can assign these permissions through the dbm cfg file.

DBADM and LOAD permissions for specific databases can be assigned to users or user groups. You can use the GRANT command to explicitly assign these permissions.
Get SYSADM Permissions
SYSADM permissions are controlled by the SYSADM_GROUP parameter in the dbm cfg file. In Windows, this parameter is set to Administrator when an instance is created. However, if you run the db2 get dbm cfg command, it looks empty ). On UNIX, It is set as the master Group of the user who created the instance.
Because only SYSADM users are allowed to update the dbm cfg file, only the users can grant any SYS * permission to other groups. The following example shows how to grant SYSADM permissions to the db2grp1 group:

Db2 update dbm cfg using SYSADM_GROUP db2grp1

Obtain SYSCTRL Permissions
Users with SYSCTRL permissions can execute all management and maintenance commands in the instance. However, unlike SYSADM users, they cannot access any data in the database unless they are granted the privileges required to access the data. The command example that the SYSCTRL user can execute on any database in the instance is as follows:

* Db2start/db2stop
* Db2 create/drop database
* Db2 create/drop tablespace
* Db2 backup/restore/rollforward database
* Db2 runstats for any table)
* Db2 update db cfg for database dbname

Users with SYSADM permissions can use the following command to assign SYSCTRL to a group:

Db2 update dbm cfg using SYSCTRL_GROUP group name

Create a table in DB2 -- a table with an auto-incrementing Column

DB2 rename a table and view table information

Deep analysis DB2 modification table

DB2 mount command performance factors

How to back up all tables in DB2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.