0

I have simple script:

for i in {1..1000}
do
    isql -v -k "Driver={ODBC Driver 17 for SQL Server};Server=mssqlserver,1282;Database=dbname;UID=user;PWD=xxx;Encrypt=no" >> aaa.log &
done

We upgraded OS from RHEL 7.9 to 8.10.
ODBC drivers installed: 11, 13, 17.

Now, when I execute it 99% of the connections are OK, BUT some of them end in error:

SQL> [08001][Microsoft][ODBC Driver 13 for SQL Server]TCP Provider: Error code 0x2746 [08001][Microsoft][ODBC Driver 13 for SQL Server]Client unable to establish connection

Such amount of connections are needed in one of SAS programs. 100% of successful connections were in the RHEL 7.9 release.
Can you advice if there is a parameter in Linux, or maybe some ODBC, OPENSSL to have it working again?

I have tried rolling back to RHEL 7.9 and the script is working without any issues.

Ronaldo
  • 6,017
  • 2
  • 13
  • 43
Juraj
  • 11
  • 2

1 Answers1

1

I'm posting my own solution as an official answer, which helped in my case:

  • ODBC driver, which was needed for connection was upgraded from 13 to 17

  • update-crypto-policies was set to LEGACY

  • openssl file which was in use (in mine case /etc/pki/tls/etc/pki/tls/openssl.cnf) updated values:

    openssl_conf = default_conf 
    [default_conf]  
    ssl_conf = ssl_sect  
    [ssl_sect]  
    system_default = system_default_sect  
    [system_default_sect]  
    MinProtocol = TLSv1.2  
    CipherString = DEFAULT@SECLEVEL=1
    
  • last but not least /etc/pki/tls/etc/pki/tls/openssl.cnf having authorization at least 644.

And that's it. After setting all of those values, I have executed isql command (but also sqlcmd) about 10-50k times in a loop, and connection rate was exactly 100%.

Hope this helps someone.

John K. N.
  • 18,854
  • 14
  • 56
  • 117
Juraj
  • 11
  • 2