Programming Geek
Rated 4.7/5 based on 1446 reviews

Getting Started With IBM DB2




Getting Started With IBM DB2

Step1:

Download IBM DB2 . Click here to download IBM DB2.

Step2:

Unzip the setup and run installer. Usually the setup starts automatically after unzipping, if not try manually from unzipped folder.
Step3:

After Installation DB2 First Steps window is popped up.
 create sample database as shown below:

a)    Click on the button (create sample database).



b)    Select the drive where you want to place your database and click ok.
This is very crucial step and don’t do this step again and again as you may face problems later.




       c)If all set, a progress window appears as shown below.






c)     If sample database creation is successfully completed ,a new window appears displaying the message as:




Step4:
 Working with DB2 on command line

       a)    Open command prompt in your computer and type the following command 
           to connect with DB2:

>clpplus db2admin@localhost:50000/sample
       Where db2admin is your user name created during installation process.




      b)    If all set, command line processor plus(clpplus) window will appear prompting to enter password. Enter the password you entered during DB2 installation.



      c)     Create a sample table as shown below:

SQL> create table project( name varchar(23), age integer);

To get the description of table type:

SQL>desc project



For more DB2 SQL queries stay tuned. Leave a comment if there is a problem.

No comments :

Post a Comment