DB2 .NET Data Provider connection strings

Connects to

IBM DB2

  • Standard

    Server=myAddress:myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword;

    The Server key value syntax is a server name / ip address and an optional port number (note the : in between).

  • Defining the connection pooling pool size

    Server=myAddress:myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword;
    Max Pool Size
    =100;Min Pool Size=10;
  • Disable connection pooling

    Server=myAddress:myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword;
    Pooling
    =false;
  • Connection pooling, time in pool

    Server=myAddress:myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword;
    Connection Lifetime
    =60;

    Defines how many seconds the connection can remain idle in the pool before its removed from the pool.

  • Connection pooling, do not pool

    Server=myAddress:myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword;
    Connection Reset
    =false;
  • Specifying schema

    Server=myAddress:myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword;
    CurrentSchema
    =mySchema;

    All unqualified SQL objects used with the current connection will be qualified with the provided schema name

Problems connecting?
Get answer in the IBM DB2 Q & A forum
.NET Framework Class LibraryIBM.Data.DB2.DB2ConnectionInfo and class library downloads

Articlesread all »

Providers

Connect

Articlesread all »

Didn't find your connection string?

Start over from the connection string reference index - or try a search!

In the Q&A forums you can ask your own question and let somebody help you.

The knowledge articles contains solutions and guides.