Pages

Showing posts with label DB2. Show all posts
Showing posts with label DB2. Show all posts

Friday, December 10, 2010

DB2 Scripting Environment


By default DB2 installer comes w/ the client tools. It has Command Line Tools, General Administration Tools , Monitoring Tools and etc. Since I am new to DB2 database, I still need to explore the default tools comes from the box. Though the tools can do the job, I find it very unproductive, I mean creation of SQL /or SQL PL is pain in the ass. No feature that most of the modern Integration Development Environment(IDE) built such as Auto-Complete, SQL formatting, etc.  and the return error seems to be low level that sometimes we need to explore to the different forum in order to understand what was the problem cause, very time consuming. I decided to explore any open source IDE for DB2 Scripting. I was a heavy Oracle database user before and I was using TOAD for Oracle to do my scripting and database comunication, So I search if there such thing as TOAD for DB2 and luckily it has in deed an IDE for DB2 databases, and the good thing is, it has a freeware version . :)  I start using the IDE, it makes me comfortable in SQL PL scripting.

And heres a little advice if your new to DB2 or Oracle database , Using such IDE it helps boost your learning and understanding  on the database objects and its  architecture. 

Check out the Download link > http://toadworld.com/Freeware/ToadforDB2Freeware/tabid/560/Default.aspx

Monday, February 8, 2010

Install IBM DB2 Express-C on Snowleopard Mac OS X 10.6.2


Installation of IBM DB2 Express-C is pretty straight forward using the GUI installer (db2setup) included on the package. The installer also has included a nice pdf instruction on how to install the database but according to what i experience following those sequence of steps it did not work for me having Snowleopard Mac OS X 10.6.2 version and , maybe some other version might work. And i also notice on the included read me and pdf instruction there are module/apps dependencies that are not mention. So if you want to install DB2 Express-C beta(at this time of writing) for Mac OS X, version 9.5.2 on your Snowleopard 10.6.2 below tutorial will work.

1. Download the Tools and the Database.

  • IBM DB2 Express-C 9.5.2 --> http://www-01.ibm.com/software/data/db2/express/download.html
  • xCode from Apple Development Community --> http://developer.apple.com/tools/xcode/

2. Install first the xCode.

3. Prepare the Mac OS for DB2.

  • we need to tweak some resources on the OS.

Increase system parameters (sysctl.conf)

Open /etc/sysctl.conf (or create it doesn't exist) and insert the following settings. These settings increase some settings for shared memory and user limits that DB2 needs in order to work on Mac.


Add the following to /etc/sysctl.conf


kern.sysv.shmmax=1073741824

kern.sysv.shmmin=1

kern.sysv.shmmni=4096

kern.sysv.shmseg=32

kern.sysv.shmall=1179648

kern.maxfilesperproc=65536

kern.maxfiles=65536

Save the file and reboot your computer. You don't need to reboot after you install DB2, only after you increase the System Parameters.

  • It also require Java version 1.6
The graphical installation of DB2 for Mac OS X requires Java 1.6 and expects to find it in /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home . If you do not have Java 1.6 on your computer, you can install it by running the Software Update on your computer and installing the latest updates. By default Snowleopard comes with 1.6 version of Java.

If you do not want to upgrade to the latest level of Java, DB2 can also be installed using the db2_install / db2icrt scripts.

4. Extract/Unpack the db2exc_952beta_MAC_x86_64.tar.gz on your desired directory.
on terminal command: tar -xvzf
> tar xvzf db2exc_952beta_MAC_x86_64.tar.gz

check the directory exp where the extracted file placed. you should have the same file like below.
* it is recommended to read the readmefirst.txt and db2exc_guide_952_MAC_x86_64.pdf file found on this directory.


to be continued...