Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2012

    Unanswered: db2profile issue.

    I have a db2 9.5 server on linux. Previously I was using a db2isnt1 one id but due to security changes I was told to create a new id. I created a new id and got my self the role of sysadm.

    The problem now is that when I log on to server using ssh session. I can't use the db2 command it gives me the following error

    -bash: db2: command not found

    I know its because the db2 environment isn't running but even one I go execute the /home/db2inst1/sqllib/db2profile command I still gives me the same error..

    what am I missing here?? help

    and how can I edit my bash that i don't have to run the db2profile command again everytime I login
    Last edited by junaid377; 04-10-12 at 03:56. Reason: missed

  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    you should never execute the profile of another user
    create a user instance for this new user
    db2profile needs to be executed each time you logon because the path and other settings have to be set..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  3. #3
    Join Date
    Jan 2009
    Zoetermeer, Holland
    Quote Originally Posted by przytula_guy View Post
    you should never execute the profile of another user
    Do not agree. Nothing wrong with executing this script from the instance owner's home dir. My guess is you forgot the "dot space".
    do not
    . /home/db2inst1/sqllib/db2profile
    to make it valid for your current session.
    Somewhere between " too small" and " too large" lies the size that is just right.
    - Scott Hayes

  4. #4
    Join Date
    Nov 2005
    add these lines to your .bash_profile

    if [ -f /home/insthome/sqllib/db2profile ]; then
        . /home/insthome/sqllib/db2profile
    from then every time you login. it will run that inst profile
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os

  5. #5
    Join Date
    Aug 2011
    Please log into your new instance, and type the below..

    This would work for you :-)

    . ~/sqllib/db2profile

  6. #6
    Join Date
    Aug 2011

    Thumbs up

    To make your changes permanently, Please write the above mentioned lines
    in either

    .profile file (or) .bash_profile file ==> which were located under the instance home directory

Posting Permissions

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