Other authentication types¶
When the database manager's AUTHENTICATION parameter isn't SERVER:
- Any other value, for example
SERVER_ENCRYPT: without the stored procedure, the agent reads the log through its own ODBC connection, whose authentication type is the agent propertyudbAuthentication(defaultSERVER). After you add the agent, setudbAuthenticationto the same value on its Configuration tab. WithSERVER_ENCRYPTand Stelo Capture on Windows Server 2016 or later, use the log reader stored procedure instead: the ODBC connection fails there with "Failed in call to log library (RC=-1)". CLIENT: see AUTHENTICATION=CLIENT.DATA_ENCRYPT: see AUTHENTICATION=DATA_ENCRYPT. IBM has deprecatedDATA_ENCRYPT; use TLS instead where you can (see SSL/TLS to a Db2 for LUW source).
Add the agent through a placeholder database¶
With AUTHENTICATION=CLIENT or DATA_ENCRYPT, the wizard can't connect to the source: its connection fails with
"Security mechanism not supported" (ERRORCODE=-4214, SQLSTATE 28000). You add the agent for a temporary database on
the Stelo VM instead, then point it at the source with the security mechanism the source needs.
-
In a Db2 command window on the Stelo VM, create a temporary database with archive logging (here with the archive directory
D:\DB2LOGS):mkdir D:\DB2LOGS db2 create db TEMPDB db2 update db cfg for TEMPDB using LOGARCHMETH1 DISK:D:\DB2LOGS db2 backup db TEMPDB to NUL -
Add the Capture Agent for
TEMPDBon the Stelo VM's host name and Db2 port, with the user you'll use on the source (see Users and privileges). Don't start it. -
On the agent's Configuration tab, add or change these properties, then save:
Property Value nameA name for the agent, for example SRCDB@srchostinstead ofTEMPDB@sqdrplus.udbReadLogUsingSPtrue(see Log reader stored procedure).sourceDbUrlThe source's JDBC URL with its security mechanism: 4forCLIENT,13forDATA_ENCRYPT, for examplejdbc:db2://srchost:50000/SRCDB:retrieveMessagesFromServerOnGetMessage=true;deferPrepares=false;securityMechanism=4;sourceDbHostThe source's host name, for example srchost.sourceDbNameThe source database, for example SRCDB. -
Start the agent and check that it runs (see Check that capture is running). It creates its control tables in the source database.
- Drop the temporary database:
db2 drop db TEMPDB.
The wizard didn't bind the StarSQL packages in the source database, so the SQDR source uses the IBM Db2 ODBC driver (see IBM Db2 ODBC driver).
AUTHENTICATION=CLIENT¶
With AUTHENTICATION=CLIENT, Db2 leaves authentication to the client. The agent needs:
- The log reader stored procedure on the source (see Log reader stored procedure).
- An agent added through a placeholder database, with
securityMechanism=4(see Add the agent through a placeholder database). - The SQDR source with the IBM Db2 ODBC driver and an ODBC data source on a database alias that uses client authentication: when you catalog the alias in the ODBC Data Source Administrator, select Specify the security options (Optional) and choose Client authentication (CLIENT).
AUTHENTICATION=DATA_ENCRYPT¶
DATA_ENCRYPT (securityMechanism=13) encrypts with DES only. Recent Java runtimes don't support DES, and the IBM
Db2 JDBC driver (JCC) dropped it in Db2 11.5 fix pack 9. So the Launch Agent must run on Java 8, with JDBC drivers that
still work there. IBM has deprecated DATA_ENCRYPT, and Stelo recommends TLS instead (see
SSL/TLS to a Db2 for LUW source); use this only until you can move to TLS.
What it changes on the Stelo VM. The Java 8 setup applies to every agent of the server:
- Stelo Capture components that need a newer Java don't run on it: the Kafka, Snowflake, Databricks and AWS Iceberg destinations. Use another Stelo VM for them, or for this source.
- Agents for other source databases need JDBC drivers that run on Java 8.
- You can't publish tables of the source from the SQDR Control Center (ask Stelo Support for the SQL that does it), and the Query tool can't connect to the source.
Steps:
-
Java 8 for the Launch Agent. Get the JDBC drivers that still run on Java 8: download downrev_jdbc_drivers.zip and extract it to
C:\ProgramData\StarQuest\sqdrplus. It holds the Derby 10.14.2.0 JDBC driver (the last Derby for Java 8) and the Db2 11.5.8 JDBC driver. Then createC:\ProgramData\StarQuest\sqdrplus\conf\wrapper-local.confwith these lines, which point the Launch Agent at the Java 8 runtime that comes with Db2 and at those drivers (the last line only with Db2 11.5.9 or later on the Stelo VM):wrapper.java.command=C:\Program Files\IBM\SQLLIB/java/jdk/jre/bin/java wrapper.java.classpath.15=C:\ProgramData\StarQuest\sqdrplus\db-derby-10.14.2.0-lib\lib/derbyclient.jar wrapper.java.classpath.16=C:\ProgramData\StarQuest\sqdrplus\db-derby-10.14.2.0-lib\lib/derbytools.jar wrapper.java.classpath.3=C:\ProgramData\StarQuest\sqdrplus\jcc11.5.8/*The numbers refer to the entries of
C:\Program Files\StarQuest\sqdrplus\capagent\wrapper\conf\wrapper.confas shipped with SQDR Plus 6.34, and can differ in your version: compare them with yourwrapper.conf, and ask Stelo Support if in doubt. Restart the SQDR Plus Launch Agent service. Its log then showsJava Version: 1.8.0_...andJDBC Driver - Apache Derby Network Client JDBC Driver 10.14.2.0. -
The log reader stored procedure on the source (recommended; see Log reader stored procedure).
- An agent added through a placeholder database, with
securityMechanism=13(see Add the agent through a placeholder database). - The SQDR source with the IBM Db2 ODBC driver: add
Authentication=DATA_ENCRYPTto the connection string, for exampleHostname=srchost;Port=50000;Database=SRCDB;Protocol=TCPIP;LongDataCompat=1;Authentication=DATA_ENCRYPT, or add the property Authentication with the value Data Encrypt to the ODBC data source.
Without the stored procedure, the agent reads the log over ODBC: leave out udbReadLogUsingSP (or set it to
false), set udbAuthentication to DATA_ENCRYPT, and add Db2's GSKit library to the Launch Agent's path (see
"Failed in call to log library (RC=-1)").