Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003

    Unanswered: newbie for db2 on linux: should I create instance for everyuser?


    I just get a linux server which will run db2/luw on it. The server will serve as a simple sandbox for my co-workers, who will run some simple 'create/drop/select stmt' mainly through CLP. Later one, some of them will play more complex scenarios..

    I already install db2 viper, and create an instance to play with. My question is:
    should let each user to create their own instance? ??

    BTW, I have root auth, and certainly all the rest co-work won't. :-)

    Thanks for your kind advice. I really appreciate if you can also point me to a newbie website for such starter questions...


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    I do not reccommend creating an instance for each user. The instance is basically the user that runs the Database Manager portion of DB2. This controls users' access to and from the DBs. Giving each user their own instance means that each user will also have their own DB. Instances take up memory, and DBs take up memory. Unless you have a server with unlimited memory do not do this. Also upgrading DB2 requires that each instance is also upgraded. This can be a big pain with lots of instances. Instances can control more than one DB, so another option would be to have one instance and a DB for each user. Again DBs take up lots of memory, so I do not reccommend this either (unless there are only a few DBs being created). A third option is to have one instance and one DB, and give each user their own schema to work in. This is done through granting rights what the users have access to.



  3. #3
    Join Date
    May 2003

    Thank you so much. I followed your suggestion and create one instance use my own userid.

    db2 created a director on my /home/myid, with the name of /home/myid/sqllib. I can use clp, such as db2start, db2stop, and create table/select the table, etc.

    There is another user id, for example: userA. How can I grant the instance to userA ?


  4. #4
    Join Date
    May 2003
    For SQL statements, you want to grant them at the database or table level.

    Please see the SQL Reference Vol 2, and look at the GRANT statements. In order for a user to be given DB2 authority, they first need to have a userid and password set up in the Linux operating system.

    If the users will connect (telnet, ssh, etc) directly to the DB2 server and logon, then they need they need there profiles set up in the same manner as the instance owner to initialize the DB2 command line environment. I believe that it is located in .bachrc for the bash shell.

    If they will access the Linux server via a remote Windows client (probably the preferred method), the you need to install the DB2 client (free) on each Windows machine, and catalog the remote node and database (that exists on your Linux box). Even for remote users, in order for them to be given DB2 authority, they first need to have a userid and password set up in the Linux operating system.

    If they are learning DB2 database administration skills, it might be better to give each one their own database, and give them dbadm authority for their own database.
    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