October 1, 2008 at 11:48 pm
Hi,
I am looking for help in order to understand and to fix the following situation:
I have an application which read and parse a flat file (thru a loop). The parsed information is inserted in to a table. After the loop (which has a insert inside is finish) I still seeing inserts in the table ( I am the only user) ,.Actually when the loop is finished not all rows are in the table, but after a while it appears , is like the insert commands are stored in a buffer and after that executed. Could you help me to figure out the cause of the problem and to fixe it ?
Thank you,
Catalin
October 1, 2008 at 11:56 pm
Hello,
What technology is the application developed in e.g. is it using ADO.Net?
I guess it is executing asynchronous DB commands i.e. the code does not wait for one insert to complete before issuing the next - correct?
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
October 2, 2008 at 12:12 am
Hi,
Thank you for your help
Yes, I am doing an asincron insert and Iam using ado.net . The problem is after let's say 30 mins when the application is finised I still seeing insers coming to the DB.
Is any way to see where the inserts are stored , or to tune something ? The table has 2000 records.
Thank you for your help
October 2, 2008 at 12:21 am
Hello,
You could run a profile on the SQL Server to see what is happening.
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
October 2, 2008 at 12:31 am
Hello Again,
Thinking more about it, It could be related to the maximum number of connections, or the connection pool e.g. if the maximum number of concurrent connections allowed is 20 and the application issues 2000 asynchronous insert statements then the inserts would be queued.
The maximum number of concurrent connections is set at the Server level.
To quote MSDN on ADO,Net Connection Pooling: If the maximum pool size has been reached and no usable connection is available, the request is queued. The connection pooler satisfies these requests by reallocating connections as they are released back into the pool. Connections are released back into the pool when you call Close or Dispose on the Connection."
Regards,
John Marsh
www.sql.lu
SQL Server Luxembourg User Group
October 2, 2008 at 5:03 am
Hi,
Thank you for your help I will take a look today
Catalin
October 2, 2008 at 8:31 am
if it's reopening, then that means the connection handling is inside the loop and this should be outside the loop.
October 2, 2008 at 9:32 pm
Hi,
Yes the connection it was inside of the loop.
Thank you for your help
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply