Learning DB2 without a local install

WePython 1 Months+

I will be starting a new job in about 5 weeks, and want to spend some private time really getting to grips with as many of DB2s features as possible, as it is the DB used in the new company.

Am I required to do a local home install of the DB so that I can play around with it and try some things out, or is there somewhere online that I can connect to a public sandbox DB to practice/test/play around with it?

If an install is required, I'll follow this link: https://stackoverflow.com/questions/3289433/where-to-start-learning-db2-programming

Thanks, Stephen


I don't think you can avoid a local install. I'm not aware of any online sites (e.g. SQLFiddle does not offer DB2).

In addition to the book you linked to, I can highly recommend the "DB2 SQL Cookbook" as well: http://mysite.verizon.net/Graeme_Birchall/id1.html

And don't forget the official manual: http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp


There is a free version of DB2, the Express-C Edition, which includes most of the features of the "real" DB2 servers.

It doesn't include some features, like label-based access controls or table partitioning; and it can only use up to 2GB of RAM and 2 processing cores. Have a look at this article to see what you may be missing out on from some of the "upper tier" editions of DB2.


Found one many years later in the UK.


You can create tables there and run SQL validation against the Developer-C environment. However, despite high version 11.1, old ansi style is supported for stored code:

CREATE OR REPLACE procedure set_int
language sql
p1: begin
declare l_var integer;
   set l_var = 1;
end p1;

In addition to what a_horse_with_no_name and bhamby said, I find IBM Information Center quite helpful. IBM developerworks can be handy.

I would also recommend watching some episodes of the DB2NightShow. Season 4 should be starting in a few weeks. It is free live web episodes regarding either DB2 LUW (Linux, Unix, Windows) or DB2 for z/OS, where they invite in different speakers to talk about different aspects of DB2 from their real-world experiences. I only attend the LUW ones since that is what I deal with where I work.

Ember Crooks' blog has also been helpful to me.

And if you can nab a copy of Understanding DB2: Learning Visually with Examples, I'd highly recommend it. Expensive, but maybe you can ask your employer to buy a copy of it for the IT department library. I borrowed a copy that was purchased for a co-worker of mine. Unfortunately, the book is still updated only to DB2 9.5 (not 9.7, 9.8, or 10.1), but it still has some really relevant and helpful topics when you are just becoming a DBA. (Same as what happened to me a few months back.)

But yes, most definitely download and install DB2 Express-C, since it is free. And it is the exact same engine as DB2 Enterprise, just with some features turned off. (You can actually turn them on by buying a license from IBM to turn your Express-C into Enterprise Edition). Also to note, IBM has deprecated the clunky Control Center GUI. It is now recommended to download IBM Data Studio full client and IBM Data Studio administration client to interact with DB2. Those are also free tools.

Note that most of the links to documentation is for DB2 10.1. If you have an earlier version of DB2, you may need to change the Information Center URL (modify the vxrx area of the URL).

Welcome aboard as a DBA! I think you will find working with DB2 is fun. I know I do! :)

Previous : Default Constraints with Merge Replication
Next : Can NOLOCK in a stored procedure be overridden when executing it?