Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    3

    Arrow Unanswered: 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.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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?

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

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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

  5. #5
    Join Date
    Oct 2004
    Posts
    3

    Talking

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •