Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: How to automaticaly execute db2profile after user login on Linux?

    Hi,
    on DB2 v9.1 on Red Hat Linux I have created new user 'test'. After login into Linux (by command 'su - test') I need to execute db2profile from /home/db2inst1/sqllib/db2profile to enable db2 profile. How to set automatic start of db2profile after login of 'test' user?
    Thanks,
    Grofaty

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Look at the .profile file of the instance owner, and copy the DB2 lines over to your other user's .profile file. The .profile file is a hidden file on their home directory. You can see hidden files with:

    ls -all
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jun 2006
    Posts
    471

    profile

    or create an client instance for this user
    from root : db2icrt....
    the complete environment will be set for this user
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by guyprzytula
    or create an client instance for this user
    from root : db2icrt....
    the complete environment will be set for this user
    If you create a client instance for a user, and there are multiple server instances on the machine, what is the default instance for that user?

    For that matter, even if there is only one instance, does the client instance user have to catalog databases on the server instance as remote databases? If so, maybe that is not what they are looking for.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Quote Originally Posted by Marcus_A
    If you create a client instance for a user, and there are multiple server instances on the machine, what is the default instance for that user?

    For that matter, even if there is only one instance, does the client instance user have to catalog databases on the server instance as remote databases? If so, maybe that is not what they are looking for.
    The user itself has its own instance - a client instance. Thus, you will have to catalog local/remote nodes and the required databases at those nodes.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  6. #6
    Join Date
    Jan 2003
    Posts
    1,605
    Quote Originally Posted by Marcus_A
    Look at the .profile file of the instance owner, and copy the DB2 lines over to your other user's .profile file.
    Hi,
    it is interesting this file .profile doesn't exist. So I created it manually and it is not started during "su - user" on Red Hat Enterprise, but it runs well on Ubuntu Linux and Suse Linux.

    So instead of putting commands into .profile I have put commands into .bash_profile and now it works.

    I am not an expert on Linux, but for months or so I have experienced some funny things using DB2 on different Linux distributions (Red Hat, Suse, Ubuntu, Fedora). Maybe I am little bit pessimistic, but it looks like Unix story is repeating at Linux - compatibility problems.
    Thanks for help,
    Grofaty

  7. #7
    Join Date
    Feb 2009
    Posts
    5
    Thank You


    Sumanth

Posting Permissions

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