For example, if you want to create a new group
db2app1
with one user
db2usr1
to
access a specific DB2 table, the necessary steps are:
1. Log on to the Linux system with
root
privileges.
2. Create the group. Make sure that the provided group name does not already
exist. Group names should not be longer than eight characters:
groupadd [ g 995] db2app1
3. Create the user and assign it to the previously created group. Make sure that
the ID for the user does not already exist. User names should not be longer
than eight characters:
useradd [ u 1001] g db2app1 m d /home/db2usr1 db2usr1 [ p passwd1]
If the user is going to access the DB2 database locally, then continue with the
next two steps:
4. Edit the profile of the created user:
vi /home/db2usr1/.profile
5. Add the following line to the profile. Be sure to specify the path of your DB2
instance owner's home directory and to specify a blank between the dot and
the command:
. /home/db2inst1/sqllib/db2profile
Passwords
The passwords that are used for DB2 UDB are the system passwords of the user.
To set a password in Linux use the
passwd
command as
root
user.
Access rights
Access to DB2 databases is restricted to users that exist on the DB2 system.
When connecting to a DB2 database you have to provide a valid user name and
password of the server's system. The information from where a user connects
(the hostname or IP address) is not required when connecting to the DB2
database. The information is in the DB2 UDB directory when the server and
database are cataloged.
If you use host name feature in MySQL, you have to implement a work around
(e.g. different users for each system). See Chapter 7.2.7, Special conversions
on page 221
for more information about a workaround and sample code for a
host authentication mechanism.
Authorities and privileges
Privileges enable users to create or access database objects. Authority levels
provide a method of grouping privileges and control over higher level database
manager maintenance and utility operations. Together, these act to control
Chapter 6. Data porting
141
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