Page 1 of 1

stored procedure initialization & call generates 3 unneeded commands

Posted: Thu 14 Apr 2016 07:24
by Ludek
hi,
following code (especially the line with storedprocname :=)

Code: Select all

  sp := TMSStoredProc.Create(nil);
  sp.Connection := amsconnection;
  sp.StoredProcName := 'dbo.somestoredsp';
generates 2 commands in the profiler log:

Code: Select all

SET NO_BROWSETABLE OFF
exec [tt].[sys].sp_procedure_params_100_rowset N'somestoredsp',1,N'dbo',NULL
the execution then reverts the NO_BROWSETABLE flag back to ON.

is there a way to get rig of those 3 weird commands? it slows down much the execution of stored procedures...

Thanks for tips, Ludek.

Re: stored procedure initialization & call generates 3 unneeded commands

Posted: Thu 28 Apr 2016 14:02
by azyk
Please let us know the script creating the stored procedure. We need to know whether the procedure has parameters, and if yes, what are they?