DB2®ConnectionStringBuilder.TrustedContextSystemUserID Property

Specifies the trusted context SYSTEM AUTHID to be used with the connection.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax

DB2Connection conn = new DB2Connection();

conn.ConnectionString = "database=db;server=server1:446;UserID=userapp1;
Password=passapp1;TrustedContextSystemUserID=masteruser;
TrustedContextSystemPassword=masterpassword;"

conn.Open();

// Do processing as userapp1, such as querying tables

conn.Close();

conn.ConnectionString = "database=db;server=server1:446;UserID=userapp2;
Password=passapp2;TrustedContextSystemUserID=masteruser;
TrustedContextSystemPassword=masterpassword;"

conn.Open();

// Do processing as userapp2

conn.Close();

Property value

A string value associated with the "TrustedContextSystemUserID" keyword.

Remarks

With connection pooling enabled, trusted connections will be reused when available.