The user's privileges are set for
SELECT, INSERT, UPDATE, DELETE, CREATE
and
DROP
on database level for
itsodb
, so we map these privileges to
SELECT
,
INSERT
,
UPDATE
and
DELETE
for all tables in the DB2 schema
itsodb
and
CREATEIN
and
DROPIN
for the schema.
6.2.3 Create DB2 user
For user and group creation we use the script in Example 6 11.
Example 6 11 Sample script to create DB2 users and groups
bash> cat db2addusr.sh
export DB2DIR= /home/db2inst1
export HOMEDIR= /home
groupadd $2
useradd g $2 m d $HOMEDIR/$1 $1
passwd $1
echo . ${DB2DIR} /sqllib/db2profile >> $HOMEDIR/$1/.profile
The creation of our user and group was done by the
root
user as shown in
Example 6 12.
Example 6 12 Creation of the user and group
bash>./db2addusr.sh itsosj db2app1
Changing password for itsosj.
New password:
Re enter new password:
Password changed
148
MySQL to DB2 UDB Conversion Guide
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved