Basic Walkthrough DB2 Part-1
Basic Walkthrough DB2 Part-1
Sept 12, 2009
Sarbjit Singh Gill
What is DB2
DATABASE 2 (DB2) for Linux, UNIX, and Windows is a data server developed by IBM. Version 9.5, available since October 2007, is the most current version of the product
DB2 Express – C
In January 2006 IBM announced this special free version of DB2 for Linux- and Windows-based operating systems. DB2 Express-C was designed for the partner and development communities, but as you
get to know this version, you'll realize it has applicability almost anywhere. A defining characteristic of DB2 Express - C is that it doesn't have the limits that are typically associated with these types of offerings from other vendors.
Installing DB2 Express – C
Almost all flavors of DB2 are very easy to install. Ad best part is that it configures all interface drivers as a part of installation. Once you finish installation you are ready to fly your imaginations. DB2 takes care of everything other than logic. And believe me, it takes care of logic too at some points, where it comes to integrity and security of your data.
In this part of tutorial, because we have snapshots, you would hardly need any comments or notes for help. First of all you need a copy of DB2 Express-C version 9.5 which is free and you can download it from IBM’s software download website.
So simple as anything else, insert the CD and wait for following screen. Or if it does not show up in few seconds, go ahead and start setup.exe from your CD. Same thing applies if you are using download extracted in any folder.
To start, if you use Windows Vista read sidebar WINDOWS VISTA SIDEBAR first.
1. Click Install a Product
2. Click Install New. If you already had installed some version of DB2, you would have seen another command button to the right of this button labeled “Work with Existing”.
3. Click Next.
4. Accept the license agreement and click Next.
5. Choose Typical and click Next.
6. Choose any except 2nd and click Next.
7. Simply leave the path default and click Next
8. Use default username as db2admin and supply the password. This account will be used for most part of our walkthrough tutorial.
9. Again all the default. You just click Next button.
10. Click Install button to start actual installation. If you hesitate, you may use back button to double check or change any setting.
11. It will take a little while to install the software.
12. All you need to click Finish button and you are done with installation.
You will see information center on line. Don’t halt here, this screen will be a close friend of yours soon. You don’t even need to take a note of its web address.
13. First steps is another close friend of yours. These screens come by to say hello to you.
14. Just Exit.
15. Go to Start button and in Run Box type db2cmd in Open textbox, hit Ok.
16. You will see following very popular Windows Command Window.
17. Now, you are proud that you have DB2. Just give it a try, type db2 and press ENTER.
18. This is the first screen that every db2 lover sees. Ops, if you disagree, I would agree with you instead. At least I can say safely, that whoever has used db2 must have seen this.
19. Try to connect to sample. See below.
20. db2 greets you with db2 version, username and Database connected to.
21. Try see some data. Type select * from act. Don’t hesitate, just go ahead and try.
22. If you are ok until here; lets leave it here and have a look at GUI.
Type quit and ENTER.
Type exit and ENTER.
23. Invoke Start>All Programs>IBM DB2>DB2COPY1 (Default)>General Administration Tools>Control Center.
24. On Control Center View you may choose Basic or Advanced and please clear checkbox toward bottom. Click OK
25. After OK above, Expand All Databases > SAMPLE >Tables in Object View.
You will see Table List on right of Object Viewer. Double Click ( right click >Open…) ACT table ( First table in the List)
26. This opens table ACT ( see below). You can do few here. Just see it and be familiar to available buttons and options.
27. This concludes our first part of tutorial.
WINDOWS VISTA SIDEBAR
I have heard from some people, of a few complications with Windows Vista. They had contacted me for help with installation. It is worth mentioning here that DB2 is very good citizen in all platforms. So, where there is a concern of data integrity and security, DB2 works very close and a standard way with operating. These things work behind the hood and mostly transparent to users. With Windows Vista, Microsoft has tightened the security to some extent and users are still used to Windows XP who always try to skip instructions from software vendors. So, if you follow instructions fully as in DB2 manuals, you will never have any issues, no mater what version of windows you use. If we have any issues, that means that we usually don’t like the manuals as much as tutorials.
Any way, for this issue, please follow following instructions at the minimum; and please don’t ask why? at least for now. I am here to walking through with you, so feel easy to do the following.
1. Before starting installation, create a new user db2admin and set password for this user. You may use existing user, but the user must have a password set.
2. Log off, and logon as db2admin or the user you want to use in DB2.
3. Start installation by starting Setup.exe as “Run as Administrator”.
This will succeed. Please note that if user has no password then you will face similar problems. Good luck.























Comments
Post a Comment