I'm getting the following SQL Server error (Event ID 18056) when running bulkload in SQL Server 2008.
The client was unable to reuse a session with SPID 500, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
There are no errors logged prior to this. Following this error, I get several errors (Event ID 4014) as follows:
A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 10054, output error: 0).
My connection string is set as follows:
connectionString="provider=SQLOLEDB;data source=db_server; database=MY_DB; User ID=user;Password=xxxxxxx; pooling=false" />
My application is set up with several threads trying to run bulkload inserts of 100000 records at a time into the same database table. This works most of the time, but after 2-3 hours, I start getting the messages listed above.
Here's the code I use to actually execute the bulkload:
objBL.ConnectionString = ConfigurationManager.ConnectionStrings["DynaSimBulkLoad"].ToString();
objBL.KeepIdentity = false;
objBL.CheckConstraints = false;
objBL.IgnoreDuplicateKeys = false;
objBL.KeepNulls = true;
objBL.BulkLoad = true;
objBL.Execute( ConfigurationManager.AppSettings["bulkloadschema"], loadFileName );
What does the session reuse error indicate here? Any thoughts on what might be causing the error?