I'm having some problems with SQL Server database connectivity. I suspect that there's been some change in the configuration of my server. I wonder if there is a way that MS will let me look a little closer under the covers so that I can understand what is going on.
First, my Microsoft SQL Server ODBC driver stopped working for no apparent reason. I noticed it in MS when I saw this in my log:
and then I gave up on it when I discovered the driver didn't work from the Microsoft ODBC Administrator window.7/24/2018 13:56:24:237 - Error In Line: 70 - No valid connection
Next, I tried my Native Client ODBC driver that ships with SQL Server. That worked from the ODBC Administrator window. I changed the Provider name in the DB connection string, which I keep in an ini file. Then I ran the following script:
Code: Select all
//Read the ini file to get connection info
Let>conn_path=D:\apps_to_compile\GLIM\GLIMCONN.INI
Let>SQL=select count(*) from stg.dbo.xx_sum_table
ReadIniFile>%conn_path%,DBConnection,DB_Server,v_SERVER
Let>DB_SERVER=%v_SERVER%
//MessageModal>%DB_SERVER%
Wait>1
//read the command line ini file
ReadIniFile>%conn_path%,DBConnection,IMAPSSTG,v_conn_IMAPSSTG
ReadIniFile>%conn_path%,DBConnection,IMAPS,v_conn_IMAPS
ReadIniFile>%conn_path%,DBConnection,DEBUG,v_debug
ReadIniFile>%conn_path%,DBConnection,LOGGING,v_log
//connect to and query db
DBConnect>%v_conn_IMAPSSTG%,dbH
DBQUERY>dbH,%SQL%,sequence_ra,v_numrec1,v_numcol1,0
If>v_debug=HIGH
MessageModal>on %computer_name% ==> %v_numrec1% and %v_numcol1%
Endif
MessageModal>sequence_ra_1_1
DBClose>dbH
Then I ran my original script. As far as the database is concerned, it is the same code using the same connection file, except that the queries are more complicated. This code ran fine until the MS ODBC driver stopped working. Now, using Native Client, I'm getting another problem with my SQL. This is from the log:
A Google search reveals a similar problem somebody else had where the table was being locked by the same process trying to read it. A reboot solved his problem. It did not solve mine. My timeout is set to infinity.7/26/2018 13:28:13:163 - Error In Line: 70 - Query timeout expired
I wonder if there is a way to get more detail than this error conveys. I really need to understand what's going on.