Skip to content

Way to provide current schema to DB2ConnectionConfiguration #8

Description

@adrinerandrade

Some companies distinguish their development environments by using different database schemas, with each deployment always using just one schema. The documentation provides an example of a SET SCHEMA update, but in such cases, it might be more convenient to specify the current schema directly in the connection, similar to how it's possible with JDBC, as shown in the example below:

jdbc:db2://<host>:<port>/<database>:currentSchema=<schema>;

If this is not currently possible, I would suggest adding this feature, perhaps with a method such as:

DB2ConnectionConfiguration config = DB2ConnectionConfiguration.builder()
                .database("testdb")
                .schema("schema")
                .host("localhost")
                .port(50000)
                .username("db2inst1")
                .password("db2inst1-pwd")
                .build();

If this capability already exists in the builder, I would recommend making it more explicit in the development documentation. At present, this is the only reference I've found related to schemas:

image

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions