If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Db2 8.x Db2profile on Solaris - Can't run it

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-29-04, 09:51
Gato Barbieri Gato Barbieri is offline
Registered User
 
Join Date: Oct 2004
Posts: 3
Arrow Db2 8.x Db2profile on Solaris - Can't run it

I need to be able to start the db2 command shell (db2) to connect to the database manually without having instance owner permissions. My understanding is that this is accomplished by running $insthome/sqllib/db2profile in the user's .profile. Doesn't work for me.

Background:
I have DB2 installed on a Solaris env. If I log in as the instance owner or su to it, I can do anything in DB2 that I want. If I login, say a regular user, I cannot run anything. I want to be able to run queries from the database without being the instance owner. The user has all the database grants - he just can't get the CLP. I was able to run a shell script and execute a java program that worked fine, only after adding the env variable of the instance owner and other librabry paths, but all to where DB2 was installed and not where the instance owner home directory links as the documentation suggests (used /opt/IBM/db2/v... vs using $INSTHOME/sqllib for the JDBC drivers).

I try to run insthome/sqllib/db2profile but when logged in as the new user, the logged in id cannot see $insthome/sqllib. Sqllib has drwxrwxr-t permissions which I assume hides it. What is the trick? I assume that this has nothing to do with the DB2 install and just permissions...don't know. It looks simple enough in InfoCenter, but it doesn't work for me.
Reply With Quote
  #2 (permalink)  
Old 10-29-04, 10:04
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Why don't you just copy the profile to the user's home? By the way, what are the permissions set for db2profile? Is it executable by users?
Reply With Quote
  #3 (permalink)  
Old 10-29-04, 13:42
Gato Barbieri Gato Barbieri is offline
Registered User
 
Join Date: Oct 2004
Posts: 3
Question

-rwxr-xr-x 1 db2inst1 db2iadm1 6575 Oct 29 11:16 db2profile

I copied it and executed and it made no difference. I can now see /export/home/db2inst1. If login as the instance owner I can type in db2 and the CLP shell works. Not with this id. I added that id to the instance owner's group too.
Reply With Quote
  #4 (permalink)  
Old 10-29-04, 14:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by Gato Barbieri
I copied it and executed and it made no difference.
But did it set the variables it should? It may sound stupid but did you run it in the same shell
Code:
. ./db2profile
Reply With Quote
  #5 (permalink)  
Old 11-01-04, 09:16
Gato Barbieri Gato Barbieri is offline
Registered User
 
Join Date: Oct 2004
Posts: 3
Talking

Well...that just shows my ignorance in Unix....worked like a charm. Thank you for your help.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On