06-13-2016 01:42 PM
I'm running an explicit pass-through query against a MS SQL Server database from SAS 9.4 on Linux, and getting intermittent connection errors:
ERROR: CLI error trying to establish connection: [SAS][ODBC 20101 driver]252 : [SAS][ODBC 20101 driver]1243
When this happens I can resubmit the code immediately, and it runs fine.
I suspect something is timing out in the handshake between SAS and SQL server, so I want to extend the SQL Server connection timeout limit.
My usual CONNECT statement uses an AuthDomain to keep userid / password out of the code. It looks like:
Connect to sqlsvr as MyDB (datasrc=MyDB AUTHDOMAIN="MyDomain");
It looks like I can add the timeout limit by passing the full connection string:
Connect to sqlsvr as MyDB (required="dsn=MyDB; uid=me; password=mypassword; Connect Timeout=30");
But I don't want to put the user name and password into my code. Is there any way I can add the Connect Timeout option to my connection string while at the same time using the authdomain to pass the userid and password?
07-08-2016 07:58 AM
I've noticed that I got the "CLI error" when the file I was trying to access was already open in another process, and so needed to be closed first before I tried to access it again.