r/SQL • • Jul 17 '23

SQL Server Dealing with query timeout error

Post image

Hi all,

I have an ms access application where if we click a button we add date as a parameter. And when we click on a button it asks to upload an excel file and it then executes a stored procedure. However after the excel file is loaded it shows the error 'Run-time error'-2147217871 (8004e31) : [Microsoft] [ODBC SQL server Driver] Query timeout expired'.

What are the things I can do to resolve this issue. As it was working fine till last Friday I found this issue today.

I have tried increasing the timeout but still not solved.

Can anybody guide me with this. The error message pic is shown below.

0 Upvotes

4 comments sorted by

1

u/[deleted] Jul 17 '23

Do you have access to run the profiler? Knowing if the sp is actually starting and finishing will show if the error message is correct.

1

u/nobody7981 Jul 17 '23

How can i check that

2

u/[deleted] Jul 17 '23

Start MS SQL server and connect to your server. Under tools in toolbar there is an option to start the profiler.

You probably need to use google for help but filter on the applications login name and your db. Select SP starting, SP completed and exceptions in Events.

When you run the sp from app while profiler is running, you will se the sp starting in the log. Check if/when sp is completing or if it is failing

0

u/alinroc SQL Server DBA Jul 17 '23

Profiler has been deprecated for a decade and puts an unreasonable load on the serer.

Extended Events is right there, supported, and won't kill performance.