1

Do you know whether it is safe to have in one shell user db2inst1 creating a database A and having another shell the same user creating at the same time database B?

create database A # shell 1
create database B # shell 2

I am using Linux/ Cent os with DB2 V 9.7 installed.

5
  • Do you have some reason to suspect it would not work?
    – WarrenT
    Oct 29, 2013 at 23:35
  • Well. ye as I found some in the NODE000 some folder called db2event and in it I found db2detaildeadlock.
    – Abruzzo Forte e Gentile
    Oct 30, 2013 at 7:53
  • 1
    I am not aware of any issues with this. Oct 30, 2013 at 12:50
  • 1
    The db2detaildeadlock directory corresponds to the DB2DETAILDEADLOCK event monitor that is automatically created in all DB2 9.7 and earlier databases. Nothing to worry about with this. Oct 31, 2013 at 0:41
  • hi Ian. That's correct, I am working with 9.7 and thanks for this. At the end the 2 db were created successfully. Oct 31, 2013 at 16:27

1 Answer 1

2

I'm also not quite sure why you are posting this without just attempting it, but yes, this will work without problem.

The only issues you might have are:

  1. If the NUMDB database manager configuration parameter is small enough that you can't activate both databases at the same time (in addition to whatever other databases are activated within the DB2 instance).

  2. If you use the AUTOCONFIGURE option for CREATE DATABASE with some silly default values so you exhaust system memory

  3. System resource contention (disk, CPU) slowing the process down.

This is really an odd question – it's hard to image a scenario where you would need to create multiple databases simultaneously. Are you coming from a different DBMS (like MySQL or SQL Server), where the concept of a database is more like a schema in DB2?

2
  • Hi. Thanks for getting back to my question. I did try to do that. The operation took quite some time. Usually on a small PC for 1 db takes me 20 minutes while on a server it takes not even a minute. The day I tried that operation it took me few hours. At the end of the day the db were created but it was very slow. BTW I need to thank you for your response that I like a lot. Oct 31, 2013 at 16:26
  • 1
    Keep in mind that a PC will generally have less memory, and much slower disk(s) than a large server. So your findings aren't necessarily surprising. If this answers your question, please accept the answer. Nov 5, 2013 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.