Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2013
    Posts
    3

    Unanswered: db2profile (Environment and Registry Variables) DB2 V9

    Hi There,

    Please explain what a db2profile is and it's purpose along with the difference between Environment and Registry variables. My environment (AIX) does not allow us to sign on to the lpar using the instance ID. We have to use our own id so I'm not sure how my id is able to execute the db2profile for that instance.

    We have our own profile and in the profile, it shows that is executing a completely different profile in another directory.

    Sorry, what I'm basically asking is the purpose and difference between Environment and Registry Variables and the purpose and use of the db2profile? Do you have to use the instance profile can you use a separate db2profile?

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by DB2_NEEWB View Post
    My environment (AIX) does not allow us to sign on to the lpar using the instance ID. We have to use our own id so I'm not sure how my id is able to execute the db2profile for that instance.
    Add something similar to the following in your user's .profile:


    # The following three lines have been added by UDB DB2.
    if [ -f /home/db2inst1/sqllib/db2profile ]; then
    . /home/db2inst1/sqllib/db2profile
    fi


    Change the path based on where db2profile for your instance is located.


    Your personal ID needs enough authority (sysadm, etc...) to administer db2 as a DBA. Or your sysadmin can setup a sudo group so that you can sudo to the instance owner and do everything using the instance ID.

  3. #3
    Join Date
    Feb 2013
    Posts
    3
    Quote Originally Posted by db2girl View Post
    Add something similar to the following in your user's .profile:


    # The following three lines have been added by UDB DB2.
    if [ -f /home/db2inst1/sqllib/db2profile ]; then
    . /home/db2inst1/sqllib/db2profile
    fi


    Change the path based on where db2profile for your instance is located.


    Your personal ID needs enough authority (sysadm, etc...) to administer db2 as a DBA. Or your sysadmin can setup a sudo group so that you can sudo to the instance owner and do everything using the instance ID.
    what does the if statement check for
    :if [ -f /home/db2inst1/sqllib/db2profile ];?

    Also, is it possible to point to a modified db2profile rather then the one in ./home/db2inst1/sqllib/db2profile?

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by DB2_NEEWB View Post
    what does the if statement check for
    :if [ -f /home/db2inst1/sqllib/db2profile ];?

    Also, is it possible to point to a modified db2profile rather then the one in ./home/db2inst1/sqllib/db2profile?
    It checks for existence of the file. It is not a good idea to ask AIX scripting questions in this forum. Ask you system admin or look it up in the ksh doc.

    In theory yes, but generally not a good idea in case the instance owner profile changes for some reason. Don't do it.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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