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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-11-05, 17:03
Ryan_lee Ryan_lee is offline
Registered User
 
Join Date: Feb 2005
Posts: 12
Database decisions ...

Hi,

I am kinda new to the DB2 world. Right now our company wants to set up DB2 for applicatoin development purpose. and the database will be used as a container for testing data. and every user will have their own set of data.

There are two solutions in my mind:
1. create a database for every developer under the same instance.
2. create only one database and every user will be granted the privilege to create tables in the database.

Could anyone help me to figure out which solution is better?
Reply With Quote
  #2 (permalink)  
Old 02-11-05, 17:15
GertK GertK is offline
Registered User
 
Join Date: Nov 2003
Location: Netherlands
Posts: 96
We develop on Windows and have given every develop it's own database on the database server. It's the only way when testing your code without interrupting other developers.

We've created backup and restore scripts with the needed commands (attach, backup , restore) so the developers only have to specify which db to restore.
Reply With Quote
  #3 (permalink)  
Old 02-11-05, 17:32
Ryan_lee Ryan_lee is offline
Registered User
 
Join Date: Feb 2005
Posts: 12
more information ...

Thanks for your reply.

I am still confusing ...

. In one database scenario, I will give every user their own tablespace, and every user has their own schema to create tables. How could they interrupt each other?
. In multiple database scenario, each user will be granted the SYSADMN so the user can create or drop database?
Reply With Quote
  #4 (permalink)  
Old 02-12-05, 01:57
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
Which DB2 platform z/OS, ULW, AS400? Each has different pros and cons.

How are the users writing code to refer to creator/owners of tables. Is it:
- fixed qualified: select ... from owner.table
If so you'll have to give each developer their own database - otherwise everyone will share the same table. This is probably GertK's situation.

- un-qualified: select ... from table
bind ... qualifier(owner)
or dynamically qualified "select ... from " || owner_variable || ".table"
in these you can choose whether you want a shared or separate database.

A lot will depend on how hard it is to manage separate databases.

I'm not sure that I would give developers great authority. The tables they'll be using will have fixed structures. If you give the DBADM (the most I'ld give them) they'll be off creating their own stuff which won't match what others are doing.

James Campbell
Reply With Quote
  #5 (permalink)  
Old 02-12-05, 04:52
GertK GertK is offline
Registered User
 
Join Date: Nov 2003
Location: Netherlands
Posts: 96
Quote:
Originally Posted by jacampbell
How are the users writing code to refer to creator/owners of tables. Is it:
- fixed qualified: select ... from owner.table
If so you'll have to give each developer their own database - otherwise everyone will share the same table. This is probably GertK's situation.

- un-qualified: select ... from table
bind ... qualifier(owner)
or dynamically qualified "select ... from " || owner_variable || ".table"
in these you can choose whether you want a shared or separate database.
James Campbell
Yes, that's our situation. We also have to solve production problems which we need to reproduce using a production database. A developer can restore the prod DB over his own database to find the problem without disturbing the work of other developers.

Quote:
Originally Posted by jacampbell
A lot will depend on how hard it is to manage separate databases.

I'm not sure that I would give developers great authority. The tables they'll be using will have fixed structures. If you give the DBADM (the most I'ld give them) they'll be off creating their own stuff which won't match what others are doing.

James Campbell
We use Object REXX scripts to backup/restore a database. A hardcoded SYSADM user/password is used within these scripts to attach/backup/restore and the scripts are tokenized so no one can read them.

We also have REXX scripts to define tables/views/sequences etc.. These scripts use the same user/pw to connect to the db.

Kind regards, Gert
Reply With Quote
  #6 (permalink)  
Old 02-13-05, 15:47
Ryan_lee Ryan_lee is offline
Registered User
 
Join Date: Feb 2005
Posts: 12
My scenario is ...

We might have 50 developers or testers using the database to do testing.

the user will create their our tables and pop their own data. The database itself is just a place to hold those tables created by individual users.

James, when you say:

- fixed qualified: select ... from owner.table

The owner here would be the same for every user, right? so in my scenaro, different users won't share the same owner, since the user will create their own tables. In this case, there wouldn't be any conflict, right?

Another question is: how many databases can run at the same time under one instance. is there a limitation?

James and Gertk, Thanks a lot for your help
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