Db2 for IBM i agent
Target Db2 for IBM i
Prerequisites
To have Gluesync working on your Db2 for IBM i instance you will need to have:
-
Valid user credentials with permission to read, and write to the target tables and respective database
Setup via Web UI
-
Hostname / IP Address: DNS record or IP Address of your server;
-
Database name: Name of your target database;
-
Username: Username with read & write access to the target tables;
-
Password: Password belonging to the given username;
-
Max connections count: Maximum number of connections the pool can instantiate.
Custom host credentials
-
Date Format: Format for date values (default:
iso). Allowed values:julian,mdy,dmy,ymd,usa,iso,eur,jis; -
Time Format: Format for time values (default:
iso). Allowed values:hms,usa,iso,eur,jis; -
Block Size (kilobytes): Size of data blocks in kilobytes (default:
32). Allowed values:0,8,16,32,64,128,256,512; -
Use connection pool: Whether to use connection pooling (default:
true);
Specific configuration
The following example shows how to apply the agent-specific configurations via Rest API.
-
Date format: (optional, defaults to
NULL), the date format to be used when negotiating the JDBC driver connection. It can be any of the following:-
julian, -
mdy, -
dmy, -
ymd, -
usa, -
iso, -
eur, -
jis;
-
-
Time format: (optional, defaults to
NULL), the time format to be used when negotiating the JDBC driver connection. It can be any of the following:-
hms, -
usa, -
iso, -
eur, -
jis;
-
Setup via Rest APIs
Here following an example of calling the CoreHub’s Rest API via curl to setup the connection for this Agent.
Connect the agent
curl --location --request PUT 'http://core-hub-ip-address:1717/pipelines/{pipelineId}/agents/{agentId}/config/credentials' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"hostCredentials": {
"connectionName": "myAgentNickName",
"host": "host-address",
"databaseName": "db_name",
"maxConnectionsCount": 100,
"username": "",
"password": ""
}'
Setup specific configuration
The following example shows how to apply the agent-specific configurations via Rest API.
curl --location --request PUT 'http://core-hub-ip-address:1717/pipelines/{pipelineId}/agents/{agentId}/config/specific' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"configuration": {
"dateFormat": "iso",
"timeFormat": "iso"
}
}'