Showing posts with label max. Show all posts
Showing posts with label max. Show all posts

Wednesday, March 28, 2012

Robust Plan execution error?

I am running a select against a View that exceeds the max allowable row size and added OPTION (ROBUST PLAN) to the select to enable the select to return a result when the row size is a problem. The original view does a number of joins.

One of our users has reported that some data values they expect to see in some of the columns for specific rows are missing or incorrect. Could using the ROBUST PLAN hint cause this to occur?

Thanks,

ChrisRefer to this link (http://www.sql-server-performance.com/hints_query.asp) for tips on ROBUST PLAN and SQLMAG (http://www.sqlmag.com/forums/messageview.cfm?catid=9&threadid=15767) link for references.

Friday, March 9, 2012

Reusing connections

Every time my asp.net app needs to open a connection, it tries to establish a new connection with the mssql server. I′ve already set the max pool size property in the connection string. After that, my app raises an "time out"error saying it couldn′t obtain a connection from the pool. The problem is that I have a lot of iddle connections. With the Enterprise Manager I can see the status of the connections. They′re all the same "awaiting command". How can I reuse this connections? I know that the connection string must be the same for all connections and it is. I′ve set it in the web.config file. If I remove the max pool size property from the connection string I get a lot, I mean A LOT of connections with the sql server. Any ideas?

You should be ensuring that all connections get closed using a try/catch/finally block. Also, take a look at the following articles:

Tuning Up ADO.NET Connection Pooling With ASP.NET Applications
ASP.NET and SQL Server Performance Tips
The .NET Connection Pool Lifeguard

HTH