I'm supposed to migrate a MySQL database into IBM DB2, but I thought I'd take baby steps first before I do something like that. So for now, I'd just like to add a database.

I'll admit that I have no experience at all with IBM DB2. Here's what I did so far:

  • I've installed the software, IBM Data Server Client Version 9.7 Fix Pack 7. Went without a hitch, although I must say, it appears simpler than either MySQL or MS SQL.
  • I've ran Control Center under General Administration Tools. I've had to run it as administrator for it to work.
  • I read somewhere that the flow is System -> Instance -> Database, so I created a system with the following details:

    • System Name: RNOLD-PC
    • Host Name: RNOLD-PC
    • Node Name: RNOLDNOD
    • OS: NT
    • Protocol: TCP/IP

    Hitting the OK button with those details produces no error. For reference, the Computer Name of the laptop I'm using is RNOLD-PC.

  • I created an Instance under that with the following details:

    • Instance Name: testInstance
    • Instance Node Name: RNOLDNOD
    • OS: NT
    • Protocol: TCIP/IP
    • Host Name: RNOLD-PC
    • Service Name: RNOLD-PC
    • (Everything else is left blank)

    Clicking the Discover button near Instance Name gets me an SQL4404N error: The DB2 Administration Server does not exist, while clicking the Retrieve Button near Port Number (which I left blank) gets me a "The Service Name RNOLD-PC was not found." If I try to add a database under that Instance, it gives me the same error.

Can I have some help on this? Where do I go from here, and how do I create a database?

EDIT: I added a Port Number (12345), which then allowed me to create a database, albeit with an error:

[IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS".

EDIT: Additional information: - Using Windows 7 32-bit

  • My first question is what did you install? Based on what I see above it looks like the Data Server Client, which I question....because you can't create databases with a client. Do you have Express-C? Enterprise Server Edition? Because it sounds to me like you didn't install the binaries needed to actually have DB2 as a database, only as a client to another system that has DB2 installed... Mar 7, 2013 at 13:58
  • Now that's the comment I'm looking for. Which one should I get? Also, there's a Control Center with Data Server Client, with the option to 'create a system', 'create an instance' and after that, 'create a database'... So I'm not even sure anymore. Mar 7, 2013 at 14:16

3 Answers 3


Ok...I think I have a better idea of what you need based on the comments above.

First off, if all you need it DB2, I'd go download DB2 10.1 Express-C (the link will take you to whatever is the latest at the time. At the time of this post it is 10.1 Fix Pack 2) to get you started. It is the same binaries as Enterprise Server Edition. All you need to do is purchase a license from IBM and apply it using db2licm -a <license file name> in order to turn your Express-C into Enterprise Server Edition. Now, that aside, since you are installing this on Windows, make sure you download the appropriate bit version (ie, 32 bit vs 64 bit).

Also, and this from my experience on Windows, make sure you install the 64 bit DB2 into Program Files (no matter which drive you install it to) and if you install the 32 bit DB2, install it into Program Files (x86) (on a 64 bit OS). If you don't do this, Windows won't find the DB2 drivers for any ODBC connections you wish to set up. And even with that, I've had hit and miss luck with 32 bit DB2 on 64 bit Windows.... Best to just use 32 bit DB2 on 32 bit Windows and 64 bit DB2 on 64 bit Windows.

Ok...whew! Now that aside, once you install DB2, it will automatically create an instance named DB2 and most likely create a database called SAMPLE (which you can always remove).

I've found it best (and this is just me) to use a system or local account for the admin ID for DB2. Either way, make sure you let DB2 create the DB2ADMNS and DB2USERS groups. Anyone you want to be able to maintain DB2 will need to be in the DB2ADMNS group and obviously if you just want to access DB2 in the DB2USERS group.

DB2 automatically comes with the DB2 Control Center,which is clunky as all get out. But don't let that turn you off. That is just a GUI, the actual database itself is amazingly fast and powerful. Besides as of version 9.5 or 9.7, IBM has deprecated the Control Center. They still have packaged it with DB2, but they really recommend that you download IBM Data Studio, which is a free, Eclipse-based product that you can use to interact with DB2. I recently downloaded it and tried it. I love it waaaaay better than Control Center. We (the DBAs at our company) are going to work on a project to roll out Data Studio to replace end user and developer access to DB2 to move away from Control Center.

When you download Data Studio, pick the "full product image" under the "Optional Downloads" section. It should be the one about 1.5GB rather than the one above that is only 112MB.

Anyway, hope this gets you started. Let me know if you have other questions.

  • Thanks. That did it. I couldn't get the latest IBM Data Studio yet, it takes too long to download, so I had to settle for an earlier version. I was able to create a database albeit without tables. I haven't seen anything pertaining to DB2ADMNS and DB2USERS, but for anything that requires logging in, I use db2admin and my own password which I set during the installation. Mar 8, 2013 at 7:57

This is a typical error when configuring DB2 the first time. There are many docs about that in the web.

  • Check instance is up
  • Check service name (/etc/serices)
  • Check instance configuration (svcename)
  • Check ports (netstats -nato)
  • Check instance local connectivity (db2 attach to db2inst1)
  • Check database local connectivity (db2 connect to sample)
  • Check remote access (telnet db2server 50000)
  • Check instance remote connectivity (db2 attach to db2inst1)
  • Check database remote connectivity (db2 connect to sample)
  • Thanks for the reply. Majority of the docs I saw online are from IBM itself, and doesn't seem to take newbies into account. How do I check if the instance is up? Command Line? Mar 7, 2013 at 9:21
  • ps -ef | grep db2sysc ; db2pd -edus
    – AngocA
    Mar 7, 2013 at 12:50
  • @AngocA - zack is working on Windows so unless he is using cygwin, he won't have Unix commands available. Mar 7, 2013 at 13:56

To fast check if instance is up try hitting db2start and if the instance is up there will be a message like this:

03/14/2023 14:47:50     0   0   SQL1026N  The database manager is already active.
SQL1026N  The database manager is already active.

If it's not, the instance will start immediately.

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Mar 14, 2023 at 19:37

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.