ODBCConnection / DB2 problem

Goodmorning everyone. at a customer I activated a synchronization between a lotus database and DB2, through the odbc drivers.

The system has been running for years and has always worked.

The application has scheduled agents that every x minutes read data from the db2, making a very simple Odbcconnection.ConnectTo (datasourcename, user, password), with the usual "Uselsx" * LSXODBC "".
however, since I updated domino to version 11.0.1 FP1, the scheduled agents no longer work (giving a generic error 720).

The SAME agents, launched manually by the user instead work regularly.

What may have happened? Did version 11 of domino introduce any changes that may have affected the functioning of the whole system?

basically the 32-bit ODBC data source works, but the 64-bit one (which I imagine is used by agents when scheduled) does not.

Some idea? Thank you

There was another discussion in this forum about the problem. I am not sure there is actually a 64-bit ODBC driver, which would lead to it failing. The client is still 32-bit, so agents run by the client would still work.

I am not certain of this, but if you search here, I think the answer is more definitive.

Note: The discussion I was thinking about was specifically about NotesSQL not having a 32-bit version, so this may not apply, but I am leaving it as it may spark some conversation about whether your data source is 32-bit only. I don't know what the 3.5/3.8 compliance stuff in that conversation means. That conversation is here.

Hi Andrea

I also have agents using OdbcConnection but to a postgres database. I have it running on Domino version 9, 32 bit. I have not upgraded because I have heard of this issue with a 64 version of Domino/ODBC. All my other servers are 64 bit. This one is specifically dedicated to just data transfer. I'm not sure if you can do that but it might be worth installing a 32 bit version of Domino and moving your agents to that server.

clem

the domino server I upgraded to 11 was previously version 10.0.1 and the 64 bit ODBC driver worked great with my agents!I still don't understand what may have happened in the transition from 10 to 11 ...

AndreA

The agents if run by the user use the ODBC connection as available on the OS the user is running the Notes client on.

Because the Notes client is currently 32-bit, that will be a 32bit ODBC driver connection.

The server is running as a 64bit process. If it runs as a service, it runs under the Windows SYSTEM account. If you open the ODBC Control Panel and immedeately see the connection the server is supposed to use, it will not work. Because the User DSN you see is for the Administrator account. For Domino to use an ODBC connection on the server, it needs to be available as a System DSN.

Also, that DSN needs to use a 64 bit driver. On my system, I need to select the right driver or I will not get a DSN using a 64bit driver.

One cause might be that when the DOmino 10 to 11 upgrade was done, the OS was also updated. Or that Domino was first run as an application, and now as a service.

Hi Lars !

everything is clear and it already is.

We have a 32-bit odbc data source, visible under the heading "User DSN" and a 64-bit one, which is instead under the heading "system DSN".
Yes, after the update to version 11 there was a reboot of windows and windows updates started, but domino ALWAYS started as a service ... even with version 10.
thanks anyway; i just can't resolve and hope in hcl, where i opened a ticket ..

Bye

What is not clear from your description is where the ODBC connection is.

On the Domino server there should be a System DSN, for the Domino server where background agents and other processes connect to ODBC.

A user DSN on the server is only available to a Notes Client running on the server, run by the logged in user. A user DSN on the server is NOT available to Notes clients running on different machines.

on domino server there are both System DNS (for agents) and user DNS, because on this machine we have also all clients administrator(client, designer, administrator).

The presenza of user DNS in this case is good, because we can launch agents with administrator user, logged in

We don't need other notes clients connect to ODBC...

Thank you again Lars..

unfortunately we are still in the same condition and the agents do not go. i am waiting for hcl, but i'm afraid they don't have the solution either

OK. So if I understand correctly, there are a couple of agents which do work if launched from the Notes Client on the Domino server, but not when run as background agent.

This has different possible causes. One is the System DSN, which is used by the background agent. This connection can be tested by running dctest command from within the Domino Console. (https://help.hcl-software.com/dom_designer/10.0.1/basic/H_149773TESTING_CONNECTIVITY_TO_EXTERNAL_DATA_SOURCES_WITH_DCTEST.html)

CAVEATS: You need to do this when the server is low on activity, and from a Domino Console application on the server. The command "LOAD DCTEST" will display a message on the console and wait for input. The Domino Administrator 'Server Console' will NOT display the message. The server will appear to hang. The 'Domino Console application which should be installed on the Domino server should display the message. You can reply to the queries by typing an answer in the console input field. Note that when the server is busy, you may have trouble seeing the output...

If you log on to the server as admin and start a commandline, and use dctest, you can test the User DSN, and practice before you try your new found expertise on a running server ;-).

Another possibility is the driver used for the System DSN is not a 64 bit capable one. At our Domino system, where this is in place (albeit a V10 server...) There are 2 System DSNs installed with the same name, one 32 bit and one 64 bit, both using the driver 'iSeries Access ODBC driver'. These drivers are installed by the IBM i Series Access Client Solutions setup. It might be an OS update of the new Domino 11 server needs a reinstall of this driver? I can find two instances of CWODBC.dll on my Domino, one in System32 (32bit) and one in SysWow64 (64bit) with differing sizes. You should have that too. The 32bit one was configured with the 32bit ODBC panel, the 64 bit one with the 64bit ODBC panel. Both connections are visible in both panels, but only the 64bit ODBC Data Sources panel can configure the 64bit DSN.

Another possibility is the parameters like username password and son on passed to the connection. To debug that, you need to know which paramaters are used to setup the connection when the agent is run by the client, and compare that to what is used when run as a background agent. You may be surprised...

Please do tell us if you found anything.

hi Lars.. I tried DCTEST launching "load dctest" from console and choosing option 3 (ODBC)

Then i wrote in sequence ODBC Source Name, user and password

First strange thing is to see this label "loaded library odbc32" (why 32 bit?)

At the end the test said me "Connectivity test Fails."

and then "[IBM][CLI Driver] SQL1042C Errore di sistema non previsto. SQLSTATE=58004" (in italian, "Errore di sistema non previsto" is "Unexpected system error")

Another weird thing i have verified is that both data sources (32 and 64 bit) are under the "System DSN" menu.
Also I can't find those "cwodbc.dll" you say.
Under the "SYSWOW64" folder I see odbc32.dll and odbcad32.exe (the same files I see under the system32 folder!)
However, I repeat that manually launched agents work very well.

Bye

1. Is your DB2 on iSeries or another platform? Which platform? Version?

2. In the ODBC DataSource Admninistrator, in my DSN, in the column 'Driver', the name is ' iSeries Access ODBC Driver'. In the tab 'Drivers', the file name for this driver (DB2 on iSeries) is CWODBC.DLL. What is listed on your end? Where are the files listed on the driver tab located?

3. The files you specify are part of the ODBC framework. They are not the drivers needed by the framework to access the database.

4. have you tried running dctest friom the commandline? (open cmd.exe, go to Notes program dir, ndctest.exe) . If I do this, and then choose 3 for ODBC, and then type in the DSN name, user name and password, and Y for driver details, I get a long list specifying the version, filename, database name and version etc. What can you see?

Hi Lars!

1 - DB2 is on a windows machine with windows server 2012 r2 (like domino machine with domino 11)

2 - I see DB2CLIO.DLL and driver name is "IBM DB2 ODBC DRIVER - COPY" and version is 10.05.500.107.

DDL file is located in "C:\IBMDB2\SQLLIB\BIN" Folder

4 - I Tried "load dctest"..with Option 3)-ODBC and what I see is :

loaded library odbc32

Data Source: : User Id: : Password: : Driver Details: [N] Attempting to connect to DITTA1...

Error connecting to ODBC Data source.
Connectivity test Fails.

[IBM][CLI Driver] SQL1042C Errore di sistema non previsto. SQLSTATE=58004

Bye

is that via the server console or via a CMD.exe Windows Commandline prompt?

And did you specify a Y for driver details?

- via domino console!

- yes, I specified Y for details

what do you see if using CMD?

with DOS CMD ndctest.exe I see :

Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER - DB2COPY1, C:\IBMDB2\SQLLIB\BIN\DB2CLIO.DLL).

New:

My colleague updated DB2 driver on server domino, from 10.5 to 11.01.2020.1393 version and now I see the same error if launch dctest from domino console "load dctest"

Specified driver could not be loaded due to system error 1114: A dynamic link library (DLL) initialization routine failed. (IBM DB2 ODBC DRIVER - DB2COPY1, C:\IBMDB2\SQLLIB\BIN\DB2CLIO.DLL).
< IBM DB2 ODBC DRIVER - DB2COPY1, C:\IBMDB2\SQLIB\BIN\DB2CLIO.DLL>

Did you also recreate the ODBC connection in the ODBC control panel after reinstalling the driver? How about connecting to DB2 using the tools installed? I suggest contacting IBM support to get the ODBC connection going.

yes, we recreated the ODBC connection after reinstalling driver.

I have already opened a ticket, but HCL didn't solve yet...

Thanks Lars

Also open a case with IBM, since the problem seems to be related to the DB2 driver, which is IBM's area, not HCL.

ALso, which driver did you reinstall? Because as Paul Allbright answered here: https://support.hcl-software.com/community?id=community_Question&sys_id=487562cddbe42cd0a45ad9fcd3961944 the old ODBC drivers will not work for v10 or v11, you need the IBM DB2 drivers.