By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,018 Members | 901 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,018 IT Pros & Developers. It's quick & easy.

How to give the DB2 access for the local users on zLinux

P: 2
Hi,
Good Morning friends,

I am new in DB2 database.we have DB2(9.1) database on zLinux.I can access the DB using the admin user.

But,i can't access the DB as a normal linux users.
Now the issue is, How to give the DB2 access for all or some local users.

Platform-RHEL4U4
Arch -s390

If anybody know the solution for this issue plz reply to me.

Regards,
Raja
Dec 6 '07 #1
Share this Question
Share on Google+
3 Replies


docdiesel
Expert 100+
P: 297
Hi,

have a look into the (hidden) file .profile in the home of the instance owner (probably db2inst1). You might find something like this:

Expand|Select|Wrap|Line Numbers
  1. if [ -f /home/db2inst1/sqllib/db2profile ]; then
  2.       . /home/db2inst1/sqllib/db2profile
  3. fi
On logon these lines execute some db2 commands and set up the db2 environment for the user to give him access to the databases in instance #1 (db2inst1). I think you have to add those to the .profile of your std. linux user.

Regards,

Bernd
Dec 6 '07 #2

P: 2
Hi,

Good morning friends,

Thank you very much for your valuable reply.

Now the local users can access the DB2.

But the users can't do anything in the database.Like create databse,table....

For example,
I login as a user "raja"
i run the command "db2 create database demo1"

I got the error like this,
"sql1092n "raja" does not have the authority to perform the requested command"

NOw my question is "how to give the authority to local users?

can you please give me the solution.

Thanks.

Regards,
Raja
Dec 7 '07 #3

docdiesel
Expert 100+
P: 297
Hi Raja,

to enable the user to create databases etc., he must be member of the db2 instance owners group. Look at the default group of db2instx, and add the raja user to it.

If you create the databases as db2instx, then probably all you need to do is to logon as instance owner and give db admin rights to the other user:

Expand|Select|Wrap|Line Numbers
  1. db2 connect to mydbname
  2. db2 grant dbadm on database to user raja
This gives you the possibility to create tablespaces, tables, indexes etc. on the database mydbname.

Regards,

Bernd
Dec 7 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.