The road to becoming a DB2 DBA
November 14, 2011Posted by on
I have a new, clean installation of Linux, which means I had to re-install DB2 Express-C as well.
I chose to install Ubuntu 10.10, because after I upgraded to 11.04 a lot of hell was being raised.
So here’s what I needed to do:
- Find my original installation file, because I didn’t want to download it again. However, here’s a link to the download site: http://www-01.ibm.com/software/data/db2/express/download.html
- Create a temporary directory (in my home directory) to extract the archive
- Extract the archive.
- Read through the system requirements. It actually IS important, especially if you’re using a 64-bit version of Linux. For some DB2 tools, the 32-bit version of the same libraries is needed. You can find the system requirements here: http://www.ibm.com/software/data/db2/udb/sysreqs.html
- I found out the hard way – after trying to run db2setup – that I had a couple of libraries missing: the 32-bit versions of libstdc++.so.6 and libaio.so.1.
I had to install these:
sudo apt-get install libstdc++6
Type Y then hit enter and the installation is done.
Now we need to handle the libaio.so.1 problem
sudo apt-cache search libaio libaio-dev - Linux kernel AIO access library - development files libaio1 - Linux kernel AIO access library - shared library libaio1-dbg - Linux kernel AIO access library - debugging symbols sudo apt-get install libaio1
- From the system requirements I also knew that I needed the 32-bit version of libpam and libstdc++.so.5. A quick search on packages.ubuntu.com reveals that it’s in ia32-libs.
So let’s install these:
sudo apt-get install ia32-libs
- Time to start the actual installation. Change to the directory of the extracted archive and run:
I did it with sudo, because when I tried to run it without, I just got the message
DBI1190I db2setup is preparing the DB2 Setup wizard which will guide
you through the program setup process. Please wait.
DBI1160I Non-root install is being performed.
But nothing ever happened. No splash screen, no activity on the hard drive, nothing. But this way it worked, and I just and had to follow the on-screen instructions.
One note here: If you don’t want to switch users all the time, you better use the same user (preferably your own) for all the 3 roles offered to you during the installation process, because only db2inst1 gets the IBM DB2 admin tools.
On the other hand, you might lose the chance to “imitate” a real life situation. So it’s up to you.
- Now I had another error message:
ERROR: SQL1042C An unexpected system error occurred.ERROR: An error occurred while trying to start the “db2inst1″ instance. The
return code is “4″ and the SQL Message is: “PROCESS_ERROR”ERROR: An error occurred while configuring the instance “db2inst1″.
Great. Luckily I found some instructions on fixing the problem here:http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14563857
- After completing the steps described on this forum, it looked my DB2 instance is up and running
One question remains: why does only the db2inst1 user have the IBM DB2 admin tools installed?
I’ll try to figure it out, but in the meantime, I think the best way is to use your own user for all the different roles offered during the installation. Or maybe not
Anyway, good luck and please don’t hesitate to comment, or give feedback.
November 13, 2011Posted by on
The workload in the past few months kept me from preparing for the IBM DB2 9 Fundamentals (730) exam. Now the same thing got me back into studying, because I’m getting desperate to get out of testing and into database administration, or basically anything related to that. Unfortunately in the meantime I forgot a lot and lost my DB2 Express-C installation on Linux. I still have it on Windows 7 though.
On the bright side, I am now a lot more motivated and also have a clean Ubuntu installation I can use, plus a new colleague to take some of the work, so I expect a lot less overtime and a lot more practice on the z/OS version of DB2.
First thing I’m going to do is install DB2 Express-C on my Linux machine while it’s still fresh
June 18, 2011Posted by on
The first interesting one. Covers the topic of creating and cataloging a new database and database objects using commands or the GUI tools available with a default DB2 client installation. Absolutely worth reading and actually following the instructions.
The only thing I would change in this tutorial is the separation of theory and practice. I’d rather have something that guides you through the creation of an entire DB and its objects while hearing about the certain objects attributes and use. This way you would see what and why needs to be done at the same time which helps you connecting the action with its purpose.
I am seriously considering making my own tutorial about it.
June 17, 2011Posted by on
The second tutorial’s topic is security.
What I figured out so far was that the three most important mechanisms of security in DB2 are
- Authentication – Basically proving that you are who you claim to be
- Authorization – That’s where the things you are allowed to do are defined
- Privileges – Whatever you can do, you can only do with certain objects. Privileges define this list of objects
Next you will need to understand the terms client, server, gateway and host. It’s not as clear as you’d think.
The rest of the tutorial goes into details about the 3 most important security mechanisms of DB2.
I should find a way to practice these, just to make it easier to learn/memorize.
June 16, 2011Posted by on
I started reading the first tutorial in the series. The first interesting thing I came across was a link to the list of test objectives. http://www-03.ibm.com/certify/tests/obj730.shtml
This tutorial covers the knowledge necessary for the objective “Planning”.
In conclusion this tutorial is more of an orientation, a bit like a whitepaper. You can find out what DB2 can do for you, and which tools are available to get it to work. Nothing hardcore, just interesting stuff to read through quickly so you know what you’re dealing with. I suppose I’ll have to come back every now and then as I find out more about DB2 and I see these tools in action. Memorizing all of it at this point does not really make sense.
Anyway, here’s an overview of what you can learn from the first tutorial.
The first 14 pages cover the different versions of DB2. I just ran through it, because this section was not in the list of test objectives. The next section was.
Only the tools which come with the DB2 client are covered since that’s all you need to know for the test. The good news is that the tools are devided into two groups; Configuration Center and Configuration Assistant, and each tool sports the same functions; Wizards, Advisors, Generate DDL etc. I think this structure makes both learning and using these tools easier, which is good.
The Control Center
The tool to manage DB2 servers. This chapter provides an overview of the things that can be done in the CC, but it doesn’t go into details on how to do them.
The Configuration Assistant
I don’t even know why this section is separated. Basically all you find out from here is that there is something called CA.
Other DB2 Tools
Another list of tools with a brief overview of what can be done in each of them.
What is data warehousing and which DB2 products to buy to do it.
June 15, 2011Posted by on
Now that I have at least one instance of DB2 Express-C up and running it’s time to look at the material I downloaded from ibm.com.
The DB2 9 Fundamentals certification preparation is a series of 7 tutorials, a sum of 263 pages in 7 PDF files.
- Introduces the different tools used to maintain DB2 databases (e.g Control center) as well as the different DB2 products and features, closing with a glance into the world of Data warehousing. (60 pages)
- Basics of security and user management. (36 pages)
- The first interesting one. Shows the structure of a DB2 database then guides you through the steps of creating and cataloging your own. (55 pages)
- Basic SQL and DML with a taste of SQL procedures (25 pages)
- DB2 Objects (tables, data types, constraints etc.) (23 pages)
- Transactions and locks (Data concurrency) (33 pages)
- Handling XML Data (31 pages)
Quite a lot. I sincerely hope it’s worth the time and effort.
June 14, 2011Posted by on
After I fixed the problem with the registry key (see previous post) I had to continue where I left off; I had to create a database. I didn’t want anything fancy so I just took the default parameters. Here’s how:
- Open the Control center (IBM DB2 -> DB2COPY1 -> General Administration tools -> Control center) and choose Basic view (Advanced view works just as fine)
- Right click on All Databases then from the menu choose Create database -> Standard…
- Now fill the form
- The database name and alias can not be longer than 8 characters
- You can use the default path, it’s probably your best bet, but if you’re running low on disk space on that certain drive, feel free to choose a different one. If you have your registry key properly configured, that is…
- I just went with the default installation, kept clicking Next and Finish and everything went fine. I suggest the same to every rookie.
I will get back this process at some point, because there’s plenty to discover here. I just don’t want to waste any more time on the isntallation at the moment.
June 12, 2011Posted by on
Last time I had this problem with the installation on Windows 7. The solution was not easy to find, especially for a rookie like me. It was very straight forward after all. I tried to find the problematic key, but I couldn’t find it. Once I realized it was never created, I couldn’t figure out how to create it. Regedit was no help either. So long story short, here’s what to do if you run into this error message:
The path specified in the "" parameter of the command is not
valid. Either there is no path with that name, or a path has been
specified when the DB2_CREATE_DB_ON_PATH registry variable is disabled
And the solution is:
- Stop the server
- Open a command line as Admin (right click- > Run as Admin)
- Issue the command:
db2set DB2_CREATE_DB_ON_PATH=YESin the command line.
- Start the server
Now you are able to create your DB in a custom location, but you probably do not want to, unless you have a good reason, like running low on disk space.
So next time you try to create your DB, it should work, but at this point, it’s not yet created.
In the next post I’ll show you how to create it after the installation is done.
June 9, 2011Posted by on
I failed to install DB2 on Ubuntu. Actually that’s not quite true, because it’s installed, it’s just creating the instance that failed. Of course I haven’t given up on it, I’m just too keen on having at least one version up and running, so I figured I’d try it on Windows 7. There’s a step-by step guide available for download from IBM.com.
This is really the download page, but on the right side menu theres a box called Highlights with a link to the Getting Started with DB2 Express-C free book (pdf)
It seemed pretty easy and went fairly problem free up to the point where you’re supposed to create your first database. There it failed due to a registry key that was not created previously. There are some ways to get around this problem and I’m going to post a step-by-step guide along with some troubleshooting tips and a list of pitfalls. I think it’s gonna be a menu item too, so check back in a couple of days.
June 8, 2011Posted by on
If you haven’t registered on IBM.com yet, then now is the time. DB2 is available for download from http://www14.software.ibm.com/webapp/download/byproduct.jsp?pgel=ibmhzn1&cm_re=masthead-_-supdl-_-dl-trials One way to go is to download the trial version of a full scale DB2 system that can be used for 90 days.
The easier way is to go with DB2 Express-C, where C stands for community.
It’s available for all sorts of hardware-sofware configurations. Here’s a list with download links from ibm.com : http://www-01.ibm.com/software/data/db2/express/download.html
I downloaded the Linux and Windows 64 bit versions, so I’ll post my experience with the installation of these.
Meanwhile, you can check out an alternative, because if you’re using Ubuntu or Debian, packages and installation instructions are available for these operating systems here: