views:

131

answers:

1

We noticed in a SQL Server Profiler trace that this proc is being called:

sp_procedure_params_managed

Each call has 350+ reads in the trace!

We are using Microsoft.Practices.EnterpriseLibrary.Data in an ASP.NET front end.

How can we eliminate these stored procedure calls? We are not explicitly calling it in code.

I'm running Sql Server 2005 and Enterprise library 3.1.0.0.

A: 

sp_procedure_params_managed is used determine the stored procedure parameters. I guess the Microsoft.Practices.EnterpriseLibrary.Data uses it to determine what the parameters are for the stored procedure call. It will probably cache the results to prevent extra overhead.

ggonsalv
Yes, it caches the results. It did that already in the very first version of the Data Application Block.
Steven
yes, I'm looking for how to disable or configure this behavior.what is the scope of the cache? Does it use an application variable?
frankadelic
Well the cache makes it easier on the developer to define parameters at runtime rather than at compile time. I am NOT familiar enough with Microsoft.Practices.EnterpriseLibrary.Data to suggest what you should do to alleviate the issue. As a breaking test, you could deny execute on the sp_procedure_params_managed and see the affect on the app. Maybe it uses the sp to validate the data type of the parameters.THIS WILL MOST PROBABLY CAUSE THE APPLICATION TO EXPLODE, SO DON'T DO THIS IN PRODUCTION!!!!!!
ggonsalv