ODBC connection issue

Hi guys,

We have recently updated a very old Windows Server 2003 hosting Domino 9.0 to now running on Windows 2016 and have also updated Domino to 9.0.1 FP9.

Previously on 2003 server we had an agent running which would connect to an sql server using ODBC.

Since the upgrade, we cant seem to get the connection going. It looks like authentication issue maybe???

Domino Server is 64bit and have set up the System DSN on 64bit, but I have tried 32bit as well.

The ODBC connection does a successful connection when I configure it.

Any help would be greatly appreciated.

Hi,

Please refer the below documents and see if it helps.

A Guide to Getting Started with NotesSQL
https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0036153

Results with changing Notes Registry in regard to configuring DSN
https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0068694

Results with installing NotesSQL 9.0 (64bit) with Domino 10.0.x installed in regard to configuring DSN
https://support.hcltechsw.com/csm?id=kb_article&sysparm_article=KB0068697

Thank you.

Regards

Shrikant J

Dear Shrikant,

NotesSQL is for making SQL queries to Notes. All your links deal with connections to Notes. The question is for a Domino agent usng an ODBC connection to SQL Server, so your answer is unhelpful.

Again I must ask you to refrain from misinforming users.

Hello Kon,

Have you tested the connection with dctest? You can run it in a command prompt in the Domino Program directory (ndctest.exe), it is a menu guided utility. also produces a log. Very handy for debugging these kinds of situations.

Hi Lars,

Thanks for your reply. We ran the ndctest and we were able to get a successful connection using the 64bit DSN. Log file has nothing as connection was successful.

Must be another issue then?

Hi Kon,

Can you please post the error message you are getting? I can't be positive without the exact error but it sounds like you may be running into a TLS 1.2 issue here. Starting with Windows 2016, TLS 1.2 is enabled in MS SQL Sever however it was not available in the OLE DB client. This link from MS talks about this and the need to download the new OLE DB client that does support TLS 1.2

https://docs.microsoft.com/en-us/archive/blogs/sqlnativeclient/announcing-the-new-release-of-ole-db-driver-for-sql-server

Since you mentioned DSN, I assume we are using ODBC to connect to the MS SQL Server, Can I ask what drivers we are using here?

Also can you post a snippet of the code where you are creating to MS SQL connection in the code as well as the code being used to connect?

Hi Paul

First up, we don't get any error messages on the server. It just locks up an agent manager thread, when it tries to connect.

We are using the "SQL Server" driver in the ODBC connection.

In the Lotus Script agent we are using LSXODBC. The very last line of this snippet is as far as it goes as it does not complete the connection. As mentioned before it locks up the agent manager and wont allow us to cancel the agent via the Tell command and we have to restart the Windows server.

Code below:

Option Public
Option Declare

UseLSX “*LSXODBC”

Sub Initialize
Dim db As NotesDatabase
Dim session As New NotesSession
Dim agent As NotesAgent
Dim doc As NotesDocument
Dim connection As ODBCConnection
Dim query As ODBCQuery
Dim result As ODBCResultSet
Dim searchFormula As String
Dim collection As NotesDocumentCollection
Dim Djob,addr,yr,mn,da,hr,mm,ss,dt,tt As String
Dim sqlctr As Integer
Dim dstat As String
Dim jdesc As String
Dim tmpJobNo As String

On Error GoTo e

Set db = session.CurrentDatabase

Set connection = New ODBCConnection
Set query = New ODBCQuery
Set result = New ODBCResultSet
Set query.Connection = connection
Set result.Query = query

If (connection.ConnectTo("DSN NAME", "SQL USER NAME", "PASSWORD")) Then</code></pre>

I think lsxodbc has been deprecated. I can find multiple problem records with 64 bit Domino and Domino 9. I recommend recoding the agent using LSXLC.

Also,

Dim Djob,addr,yr,mn,da,hr,mm,ss,dt,tt As String

gives you tt As String, and all the others as Variant, which may not be what you want.

Hi Lars,

What do you recommend I use instead of lsxodbc?

LSXLC. INstalled by default. Same stuff that (L|I|H)EI and DECS use to function. Documented in Domino Designer Basic Ussr Guide, under "Connectors".

You have some reading to do...

Hi Kon,

LSDO is still supported. There is no new functionality being added to it and we do recommend using LSX LC for any new agents that are being developed.

The fact that we are not getting an error message means that the hang will be happening on the line:

If (connection.ConnectTo("DSN NAME", "SQL USER NAME", "PASSWORD")) Then
Once we issue the ConnectTo, we are handing control off to SQL and waiting for control to come back. The agent will not end until it does get the control back, that is why you are seeing the agent manager thread loss.

I'm still thinking the issue here is with the old OLE DB client not supporting TLS 1.2 noted in the link above. I would suggest downloading and installing the new OLE DB client from MS. This should also update the SQL Server ODBC driver that gets installed as part of the OLE DB client. Once that is done, re create your DSN and retry your agent and see if it works.

If that still does not get it working, I would suggest opening a Case with HCL support so we can take a closer look and figure out what else needs to be done.