Helpful Information
 
 
Category: DB2 Development
DB2: Book suggestions?

I'm looking for suggestions on a good DB2 book; something w/ a great reference section, but also w/ some tutorials on the various functions etc.

These are the five books that I used for DB2 mainly because they fit the type of development I was doing. They may or may not be what you're looking for:

This book is great if you're going to be using stored procedures. It's all the book discusses.

DB2 SQL Procedural Language for Linux, Unix and Windows (http://www.amazon.com/exec/obidos/tg/detail/-/0131007726/104-2989996-7170312)

While this is a certification guide, it is still a pretty good reference for a DBA. I got it for free so I can't be too critical.

DB2 Universal Database V8 for Linux, UNIX, and Windows Database Administration Certification Guide (5th Edition) (http://www.amazon.com/exec/obidos/tg/detail/-/0130463612/104-2989996-7170312)

The following three books are some of my favorites because they talk specifically about accessing DB2 using C++. They cover CLI (Call Level Interface), embedded SQL and API calls. Tons of examples and all the source code included on CD's. They are several years old, but I used the examples verbatim to access UDB 8.1 with no problems. These aren't for everyone, but I found them to be invaluable.

DB2 Universal Database Call-Level Interface (Cli) Developer's Guide (http://www.amazon.com/exec/obidos/tg/detail/-/0071345728/104-2989996-7170312)

DB2 Universal Database SQL Developer's Guide (http://www.amazon.com/exec/obidos/tg/detail/-/0071353895/104-2989996-7170312)

DB2 Universal Development Guide (http://www.amazon.com/exec/obidos/tg/detail/-/0071353925/104-2989996-7170312)

wow DC, thanks for the great refs. Had no idea you were such a DB2 stud ;) lol

we're doing the whole IBM thing here - db2, wsad, was, j2ee yada yada.

The bad news is that reading IBM documentation has been proven to cause narcolepsy. The good news is that there are other resources that aren't quite as painful:

IBM developerWorks (http://www-136.ibm.com/developerworks/)
WebSphere TechJournal (http://www-106.ibm.com/developerworks/websphere/techjournal/archive/)
WebSphere Developer Domain (http://www-106.ibm.com/developerworks/apps/ViewServlet.wss?viewType=Library&devDomain=wsdd&sortBy=Posted&start=1&prodfam=0&topic=0&format=18&keyword=&count=10&S_TACT=104AHW18&S_CMP=ZHP)
developerWorks DB2 Library (http://www-106.ibm.com/developerworks/apps/ViewServlet.wss?viewType=Library&devDomain=dmdd&sortBy=Posted&start=1&keyword=&prodfam=0&topic=0&format=18&count=0&S_TACT=104AHW18&S_CMP=ZHP)

The bad news is that reading IBM documentation has been proven to cause narcolepsy.

lmao :D

drgroove, did you install the ibm documentation when you installed the db2 odbc driver? I like the IBM Information center FWIW.

drgroove, did you install the ibm documentation when you installed the db2 odbc driver? I like the IBM Information center FWIW.

our DB2 is running on a remote solaris box; i don't have it running locally.

is there a version of the doc separate from the install?

You should be able to install the documentation with the administration client and probably just the odbc driver not the database itself.
I'll see if I can find a seperate installation of the information center for you.

It's nice to see so many here doing development with IBM, DB2, WSAD and WAS. This is what I use at work also.

It's nice to see so many here doing development with IBM, DB2, WSAD and WAS. This is what I use at work also.

I've only been working under this architecture briefly, but yeah, I'm all-IBM at the moment. Definitely good to know there's other DSer's out there who are ibm-homogenized. :D

You should be able to install the documentation with the administration client and probably just the odbc driver not the database itself.
I'll see if I can find a seperate installation of the information center for you.

rockin' :D

Here is a link in IBM's site where you can download the information center for the appropriate version of DB2 that you are running.

You can find out which version by either a: opening up a db2 command window and typing db2
you will get something like this:
C:\Program Files\SQLLIB\bin>db2
(c) Copyright IBM Corporation 1993,2001
Command Line Processor for DB2 SDK 7.2.8

You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd plus more, but the relevant part is in bold.
or b: you can connect to a database
C:\Program Files\SQLLIB\bin>db2 connect to myserver user me
Enter current password for me:

Database Connection Information

Database server = DB2/LINUX 7.2.8
SQL authorization ID = ME
Local database alias = MYSERVERI can have an iso of the admin client if you need it for windows (or just about any other os) but it is large. Let me know if you want to download that and we'll set something up. The iso is for 7.1. You will have to download the appropriate patches to get it to something higher.

Wow - how long has this DB2 forum been here??? Did I overlook for so long?

I have been using DB2 for almost 10 years, currently use via ASP and ASP.NET to access both DB2 on Z/OS and UDB on Win 200X. Powerfull stuff. A few 'gotchas' with ADO early on.
Have not tried any PHP/DB2 as of yet.

Some good resources mentioned so far - I would add:
http://www.idug.org/html/home.asp
and
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=comp.databases.ibm-db2

The first is the International DB2 Users Group and the second
has a number of IBM folks responding to questions.

Stinger will be the next release of DB2 for Unix/Linux/Windows,
and promises even tighter integration with the .NET platform.

fv

...and this :
http://ourworld.compuserve.com/homepages/graeme_birchall/HTM_COOK.HTM

is really good - I have versions in binders for DB2 V7.2 and 8.X
at work.

fv

Wow - how long has this DB2 forum been here??? Did I overlook for so long?

Rest assured, your observational skills are ok. As a matter of fact I would say they are pretty good - this forum was just created. :)

Ok, good, I am then relieved. IBM finally awoke from a deep slumber where their tunnel vision saw only Java and mainframe applications a couple of years ago. Now they are offering deep integration into the .NET development environment and embracing also open source. Linux, PHP, etc.
amazing...

Anyway - that DB2 cookbook I referenced earlier is a pretty good quick ref

fv

Good! So how are the DB2 expolrations going so far?
Perhaps a little different syntax with some things such as limiting queries to X records or getting the last inserted ID
and such...

fv

Good! So how are the DB2 expolrations going so far?
Perhaps a little different syntax with some things such as limiting queries to X records or getting the last inserted ID
and such...

fvYou can limit queries to X number of records easily enough, but you can't limit like in MySQL. With DB2, you can't fetch any number of records from the top down.
i.e.
select * from some_schema.some_table fetch first 100 rows only
This would return the first 100 rows from the resultset instead of the entire resultset.

Sure you can -
select colA
, colB
, colC
, colD
from mytable
order by colB
fetch first 100 rows only

should do the trick.

fv

fractalvibes, why are you posting an answer to a question you asked?!?










privacy (GDPR)