Monday, May 14, 2012

Tech Tuesday - SQL Timeouts

This week we have an article from our service delivery manager at eOne. He has discovered a tip to improve sql performance when using the query builder windows in SmartConnect:


We have had a few people that have had timeout issues when creating queries in our SmartConnect Query Builder window accessed by hitting the modify button when you have a SQL ODBC datasource. For most people the list of tables is quickly populated from whatever database that was specified. Others will see it sit there for a while and ultimately get a SQL timeout. What is actually running behind the scenes is a standard SQL Server procedure called sp_tables. Again, on most systems we see results returned very quickly if we run the following statement in SQL Server Management Studio:
 

     EXEC sp_tables

For people that are having a timeout issue like described above we can simply restart the SQL Server service and SQL Server will run that query very quickly and you shouldn’t have timeout issues anymore. Most likely this occurs because of the SQL Server running for a long period of time and many processes (ie Creating databases, tables, views, restoring databases, etc) have fragmented the internal index.

I hope this helps anyone who has experienced any timeouts in SmartConnect or even someone potentially using the sp_tables procedure for other purposes outside of SmartConnect.

Chris Dew

No comments: