Friday, November 16, 2012

2 Getting Start with DB2

Prepare the environment

IBM has provide the VM image  with DB2 9.7 Express-C preinstall on the Linux along with other training material. You can download them from here http://www14.software.ibm.com/webapp/download/search.jsp?pn=DB2+Express-C 

You will need to create the IBM account to download it. The account registration is free.   The DB2 Academic Training Materials has good instruction how to setup the VM. 

You will also need the VM Player to run the image.  I use VMware workstation long time ago ( about 5 years ) while the time VMware just announce the VM player product. As I recall, VM Player is the read-only VM solution which means it can not be used to create the virtual machine like VMware work station. I was quite surprise this time when I use the VM Player, I seem to be able to create the VM.  While starting up the VM, it will ask you whether to install or upgrade the VMware tools on the guest OS. This will help out the performance of the VM.

image

The Default user name is root. Password is password. You can find all those information in the VMware Basics and Introduction_Lab guide, which is also include in the training material.  After accept the license agreement, you will see the actual login screen

image

The user name is  db2inst1 and password is password .

Connect to the db2

db2list -all

List the basic db2 environment variables. Including the instance name.

Find the instance name from DB2INSTDEF

image

Attach to the instance. This step similar to the MSSQL/Sybase connect to the database instance but not yet to use the database.

db2 attach to  <INSTNACE NAME>

image

Find the DB2 database name from catalog.

db2 list database directory 

image

Connect to the database.

DB2 connect to <database name>

image

Run query from db2 command . DB2 table name is case sensitive.

DB2 "SQL Statement"

image

Other useful basic db2 command

Check memory/uptime from the snapshot

db2 get snapshot for dbm

image

check the instance configure

DB2 get dbm cfg
db2 get dbm cfg show detail

check the database configure 

db2 get db cfg
db2 get db cfg show detail

2 comments:

  1. Youtube
    www.youtube.com/watch?v=avgg8k5n83U
    Sign Up Here: viadmin.com/vmware-vsphere-training.html ...

    In this video, I am going to show you what are the options that you have when it comes to VMWare Training.


    There are five ways to get VMWare trained:


    What is fist Option that you have? It's a 5 day instructor-led VMWare training.


    Online classes are live, Instructor-Led training sessions, usually from 9 to 5 - delivered online. The course diration is Five days - 3 days of which are lectures and 2 days of instructor assisted hands-on lab, and at the end of the week extra days of self managed practice. And and extra week for VMWare Practice.

    Now... what is the soluton? You need VMWare Training that is more conducive to effective learning and covers more content than the official training offered by VMWare!

    We focus on making sure you have the skills critical to get the job you want and in the same time be capable of supporting critical cloud initiatives and datacenter infrastructure.


    Our teachers are highly qualified, each with years of experience. All hold VCP and CVIA certificates. More importantly, they love teaching VMWare online and strive to make your experience as fun, enjoyable and effective as possible.

    Instead of spending thousands of dollars for the official course you will be better of to Sign up for one of our online VMWare training classes and get top quality training for a fraction of the cost.

    Now, Option #2: You can use Personal, One on One VMWare Tutoring services, they are inexpensive and a great fit for busy professionals.


    Now let's take a look at what does the "One on One VMWare Training" session look like?


    Well, you pick up the topics and we deliver the training according to your schedule! You Have a personal VMWare Trainer which will instantly speed up your learning by responding to your individual training needs and questions.


    Sounds great - isn't it...? Today - You can learn VMWare online with the help of Skype and Team Viewer and enjoy high quality training given by our trusted and certified trainers - no matter where in the world you are.

    You need to get the training, but you have to work around busy work and family schedules. Not a problem! Our teachers are available 24 x 7, Monday to Friday and over the weekends! And because each class is only one hour or less, depending on your needs, you can choose to take class 2 or 3 times a week, without significant cost.


    Option #3 VMWare Practice Lab.


    Option #4: If you are preparing yourself for one of the VMWare Exams, and you are not sure what to expect at the exam, there is an Exam preparation training to get you ready for the exam.


    Option #5: Training videos. We created hundreds of videos that you can use to quickly learn and


    Now you can learn VMWare on your own terms, where you want and how you want.


    What I believe is...VMWare vSphere Training has to be affordable, practical and comprehensive. We offer just that with our set of VMWare Training sessions, practice lab and exam preparation.

    Our VMWare Training has been Specifically Designed to develop your VMWare Administrator qualities along with your ability to deal with real-life system problems.

    So don't wait for the last moment click on the link below and sign up for VMWare Training today!

    ReplyDelete

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates