on 2017 Apr 10 5:28 PM
Hello again,
We've been seeing a lot of warnings in the LogML.txt file, containing the message Executing SQL directly; no cursor., as show below:
W. 2017-04-10 15:36:34. <8> [10050] ODBC: [Microsoft][SQL Server Native Client 11.0][SQL Server]Executing SQL directly; no cursor. (ODBC State = 01000, Native error code = 16954)
After some analysis it seems to be related to download cursor of tables which contains columns of long-length types, like long varchar and long binary. Using a SQL profiler I concluded that for these tables (and only these tables) the following SQL command is executed:
declare @p1 int set @p1=NULL declare @p2 int set @p2=0 declare @p5 int set @p5=4104 declare @p6 int set @p6=8193 declare @p7 int set @p7=0 exec sp_cursorprepexec @p1 output,@p2 output,N'@P1 datetime2,@P2 varchar(128)',N' EXEC MySyncProc @LastDownload = @P1, @idMobileDB = @P2',@p5 output,@p6 output,@p7 output,'2017-04-07 15:16:26.4200000','3147' select @p1, @p2, @p5, @p6, @p7
However, for other tables the command sp_prepexec is called instead, as follow:
declare @p1 int set @p1=NULL exec sp_prepexec @p1 output,N'@P1 datetime2,@P2 varchar(128)',N' EXEC MySyncProd2 @LastDownload = @P1, @idMobileDB = @P2','2017-04-07 15:16:26.4200000','3147' select @p1
Questions:
User | Count |
---|---|
67 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.