IBM publish the application “DB2demo” for user to experience and test the DB2 features. The application can be download from here .
- Referential integrity
- Domains and constraints
- Recursive SQL
- Outer joins
- Large object support (BLOBs)
- User-defined types
- User-defined functions
- Table functions
- Row-types and typed tables
- Reference types
- SQL PL stored procedure language
- SQL/XML functions
- XML data type
- XQuery language extensions
- Star schema support
- Multi-dimensional analysis
- Dynamic bitmap indexes
- Automatic summary tables
- Table partitioning
Installation is very simple , just basic step by step like any other application.
The application does have db2 client dependence, If you don’t have db2 client install, you will get the error “File not found db2cli”
To fix this error, we need to install db2 client.
There are various db2 client available .
- IBM Data Server Driver Package
- IBM Data Server Driver for JDBC and SQLJ
- IBM Data Server Driver for ODBC and CLI
- IBM Data Server Runtime Client
- IBM Data Server Client
Because I only need the db2cli capability, I decide to choice the smaller footprint “IBM Data Server Driver Package” . The package can be download from this link. The db2demo is 32-bit application,therefore the 32-bit db2 client is required.
Configure the db2 server client
Compare to RUNTIME client, There are 2 major short for the IBM Data Server Driver Package :
- NO DB2 cmd
- Can not catalog the database.
In order for db2 to know where is the database, we have to update the db2dsdriver.cfg.
The path of the db2dsdriver.cfg is in the C:\ProgramData\IBM\DB2\IBMDBCL1\cfg , Here is my sample of the configuration file.
<dsn alias="db2inst97" name="SAMPLE" host="192.168.208.129" port="50001"/>
<!-- Long aliases are supported -->
<database name="SAMPLE" host="192.168.208.129" port="50001">
The db2demo works properly after the db2dsdriver.cfg is set.