DB2 Backend Reference

Prerequisites

Supported Versions

The SOCI DB2 backend .

Tested Platforms

DB2 versionOperating SystemCompiler
-Linux PPC64GCC
9.1LinuxGCC
9.5LinuxGCC
9.7LinuxGCC
10.1LinuxGCC
10.1Windows 8Visual Studio 2012

Required Client Libraries

The SOCI DB2 backend requires IBM DB2 Call Level Interface (CLI) library.

Connecting to the Database

On Unix, before using the DB2 backend please make sure, that you have sourced DB2 profile into your environment:

. ~/db2inst1/sqllib/db2profile

To establish a connection to the DB2 database, create a session object using the DB2 backend factory together with the database file name:

soci::session sql(soci::db2, "your DB2 connection string here");

SOCI Feature Support

Dynamic Binding

TODO

Binding by Name

TODO

Bulk Operations

Supported, but with caution as it hasn't been extensively tested.

Transactions

Currently, not supported.

BLOB Data Type

Currently, not supported.

Nested Statements

Nesting statements are not processed by SOCI in any special way and they work as implemented by the DB2 database.

Stored Procedures

Stored procedures are supported, with CALL statement.

Acessing the native database API

TODO

Backend-specific extensions

None.

Configuration options

None