Re: Procedure execution problem - Clients performances



Exactly how are you calling it in SSMS? Can you show the exact code? In ..net you are defining the datatypes and in SSMS it may be guessing. Plus it will be an RPC call in .net vs. a Batch in SSMS and will get two plans which may or may not be the same.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Robson Luiz" <robsonbr_2004@xxxxxxxxxxxx> wrote in message news:e2Ohe0cPIHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
But it still strange..

Same procedure with same parameters executes in 1 sec in sql management studio and get me timeout when executed in a .net application using sqlclient.

but if i recompile the SP in SSMS both cases work well.

But after a time the problem repeats.. I see SSMS is not sensitive to query plan as sqlclient is.

Robson

Robson

"Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx> wrote in message news:OR2OQMbPIHA.5164@xxxxxxxxxxxxxxxxxxxxxxx
Sounds like parameter sniffing issue. Have a look at these:

http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx
http://blogs.msdn.com/queryoptteam/archive/2006/03/31/565991.aspx
http://omnibuzz-sql.blogspot.com/2006/11/parameter-sniffing-stored-procedures.html


--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Robson Luiz" <robsonbr_2004@xxxxxxxxxxxx> wrote in message news:%23mBc09ZPIHA.280@xxxxxxxxxxxxxxxxxxxxxxx
Hello people.

I have a strange behaviour with a stored procedure.

Using management studio procedure executes in 1 second.

Using a .net application (VS 2005) with sqlclient same procedure get me a timeout execution..

Any help???

Best

Robson





.



Relevant Pages

  • Re: Procedure execution problem - Clients performances
    ... .net may interpret it differently than ODBC in SSMS. ... Andrew J. Kelly SQL MVP ... Dim conn As New SqlConnection ... Same procedure with same parameters executes in 1 sec in sql management studio and get me timeout when executed in a .net application using sqlclient. ...
    (microsoft.public.sqlserver.clients)
  • Re: 2005 Std Edition Installed, but not running PS
    ... You happen to know the name of the SSMS msi file? ... Andrew J. Kelly SQL MVP ... install the Express edition of SSMS. ... Microsoft SQL Server 2005 Tools Express Edition ...
    (microsoft.public.sqlserver.setup)
  • Re: 2005 Std Edition Installed, but not running
    ... thousands of others and have no problems running SSMS at all. ... the install again. ... Andrew J. Kelly SQL MVP ... are configuration tools found in the configuration tools menu under SQL ...
    (microsoft.public.sqlserver.setup)
  • Re: 2005 Std Edition Installed, but not running
    ... thousands of others and have no problems running SSMS at all. ... Are you saying that when you go to Start - programs - SQL Server 2005 you do not see an entry for SQL Server Management Studio? ... Andrew J. Kelly SQL MVP ... You manage SQL Server with the configuration manager and surface are configuration tools found in the configuration tools menu under SQL Server 2005 start - programs. ...
    (microsoft.public.sqlserver.setup)
  • Re: Copy/Paste behavior in SSMS
    ... Andrew J. Kelly SQL MVP ... Paul A. Mestemaker II wrote: ... task you'd like to automate? ... task using SQLCMD Mode in SSMS. ...
    (microsoft.public.sqlserver.tools)

Loading