Stored procedure timeout - but when starting from SSMS

I have a stored procedure with an error "Timed out."

This code uses ADO / VB6.

The stored procedure itself is not a problem, you can run it in the query window and takes less than a second.

The code used to get the connection, etc., is also modular and is used throughout the huge application. Only in this one place does a timeout occur in one particular database.

An error will be played every time to search for attempts, regardless of whether the VB6 code runs in debugging or not, and then suddenly everything starts working again. Then for some time in the future the same problem will reappear.

I'm not sure how many codes to put here; there is nothing complicated about it; it is basically;

Set adoCommandObject.ActiveConnection = ...{open ADODB.Connection object}
Set rs = CreateObject("ADODB.Recordset")
Call rs.Open(adoCommandObject, , adOpenForwardOnly, adLockReadOnly)'Timeout occurs here

I looked in the profiler, but it did not give any hints, except that sometimes the statement “SET NO_BROWSETABLE ON” / “SET NO_BROWSETABLE OFF” was observed, which was executed before and after running sp.

I searched the net but could not find satisfactory help for this; I am ready to try something at this stage (besides rewriting in .NET, unfortunately, this is not an option!)

+3
source share
2 answers

, . , MSSQL, , -, , . . . , -, , . , . poof, , , . , , .

, , . . , . , , . , , , .

+3
  • , - , .
  • , , . -
  • , , ?

SET NO_BROWSETABLE ON FOR BROWSE . , ado, , . , Recordset, , , .

0

Source: https://habr.com/ru/post/1708906/


All Articles