If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > newbie for db2 on linux: should I create instance for everyuser?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-18-06, 13:30
nidm nidm is offline
Registered User
 
Join Date: May 2003
Posts: 113
newbie for db2 on linux: should I create instance for everyuser?

hi,

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

nidm
Reply With Quote
  #2 (permalink)  
Old 08-18-06, 14:27
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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.

HTH

Andy
Reply With Quote
  #3 (permalink)  
Old 08-18-06, 20:31
nidm nidm is offline
Registered User
 
Join Date: May 2003
Posts: 113
Andy,

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 ?

Thx
Reply With Quote
  #4 (permalink)  
Old 08-18-06, 23:08
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On