DB2 User Table Volume Licensing _php Tutorials

Source: Internet
Author: User
Tags db2 connect db2 connect to

DB2 User Table Volume Licensing



First, the new user
[Root@localhost ~]# passwd Ghan
Changing password for user Ghan.
New UNIX Password:
Bad password:it are too short
Retype new UNIX Password:
Passwd:all authentication tokens updated successfully.
[Root@localhost ~]# Su-db2inst2
[Db2inst2@localhost ~]$ DB2 connect to Ghan user Ghan
Enter the current password for Ghan:


Database connection Information


Database Server = db2/linuxx8664 9.7.5
SQL Authorization id = GHAN
Local Database alias = GHAN


Second, access to the DB2INT2.T2 table error

[Db2inst2@localhost ~]$ DB2 "SELECT COUNT (1) from Db2inst2.t2"
sql0551n "GHAN" does not have a pair of objects "db2inst2. T2 "Perform operation" select "
The required permissions or privileges. sqlstate=42501



[Db2inst2@localhost ~]$ DB2 Connect to Ghan


Database connection Information


Database Server = db2/linuxx8664 9.7.5
SQL Authorization id = db2inst2
Local Database alias = GHAN

Iii. Generating Authorization scripts
[Db2inst2@localhost ~]$ db2-x +o-z commands.sql "Select ' Grant Select,insert, UPDATE, delete on table ' | | Trim (Tabschema) | | '.' || Trim (tabname) | | ' to User Ghan; ' from syscat.tables where type = ' T ' "
Iv. modification of the written form authorization
[Db2inst2@localhost ~]$ VI Commands.sql

Slightly * * *

V. Enforcement of AUTHORIZATION statements
[Db2inst2@localhost ~]$ DB2-TSVF Commands.sql
Grant Select,insert, UPDATE, delete on table Db2inst2. Empl to User Ghan
Db20000i SQL Command completed successfully.


Grant Select,insert, UPDATE, delete on table Db2inst2. Empldd to User Ghan
Db20000i SQL Command completed successfully.


Grant Select,insert, UPDATE, delete on table Db2inst2. Staff to User Ghan
Db20000i SQL Command completed successfully.


Grant Select,insert, UPDATE, delete on table Db2inst2. T1 to User Ghan
Db20000i SQL Command completed successfully.



[Db2inst2@localhost ~]$ DB2 connect to Ghan user Ghan
Enter the current password for Ghan:


Database connection Information


Database Server = db2/linuxx8664 9.7.5
SQL Authorization id = GHAN
Local Database alias = GHAN

VI. Test Authorization Results

[Db2inst2@localhost ~]$ DB2 "SELECT COUNT (*) from DB2INST2.T1"


1
-----------
4


1 records have been selected.

http://www.bkjia.com/PHPjc/1068094.html www.bkjia.com true http://www.bkjia.com/PHPjc/1068094.html techarticle DB2 User Table Volume Licensing one, new user [root@localhost ~]# passwd ghan changing password for user Ghan. New Unix Password:bad Password:it is too short Retype new Unix passwo ...

  • 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.