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