SqlBulkCopy Causes Deadlock On SQL Server 2000?

May 12, 2010

I have a customized data import executable in .NET 3.5 which the SqlBulkCopy to basically do faster inserts on large amounts of data. The app basically takes an input file, massages the data and bulk uploads it into a SQL Server 2000. It was written by a consultant who was building it with a SQL 2008 database environment. Would that env difference be causing this? SQL 2000 does have the bcp utility which is what BulkCopy is based on. So, When we ran this, it triggered a Deadlock error.

Error details: Transaction (Process ID 58) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

I've tried numerous ways to try to resolve it. like temporarily setting the connection string variable MultipleActiveResultSets=true, which wasn't ideal, but it still gives a Deadlock error. I also made sure it wasn't a connection time out problem. here's the function.

/// <summary>
/// Bulks the insert.
/// </summary>[code].....

View 4 Replies


Similar Messages:

Using SqlBulkCopy To Restore Tables From Xml Backups/Timeout Expired With SqlBulkCopy

Dec 26, 2010

I'm using SqlBulkCopy to restore tables from xml backups. One of the table backup is ~200MB large and has a lot of records.

I'm having error:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

View 2 Replies

SQL Server :: How To Prevent Deadlock

Sep 28, 2010

how to prevent deadlock? read from other forum knowing that even a simple select statement will cause deadlock, but i confuse on how can i prevent it?

View 8 Replies

SQL Server :: Deadlock Sql Exception?

Jan 7, 2011

My application is a survey application and I am using asp.net 2.0 and sql server 2005 version. There are many users taking survey at a single point of time. Some times delock is coming at a single method where i am deleting some records in a loop one by one(This delete statement may be executed for about 20 question in a page). This is a simple delete statement as below

delete table_name where column_name1='' and column_name2=''

column_name1 has foriegn key constraint, column_name2 also has foriegn key constraint.

The exception is as below.

Transaction (Process ID 204) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction

View 6 Replies

SQL Server Deadlock While Inserting Rows In A Table

Oct 15, 2010

The topic of sql server deadlock has been discussed many times, however, I was unsure that even two simultaneous inserts on a table can end up in a deadlock situation. Scenario: While testing our application (SQL Server 2005 as backend, ASP.net 3.5) we inserted records into a table simultaneously (simplified overview) and that resulted into a deadlock for more than 70% of users.

I could not get a hang of this as how an insert is being deadlock as this is not a case of multiple resources. After a detailed analysis (of reproducing the bug by two users) I found that both the processes were holding a RangeS-S lock on the primary key index of the table and were trying to convert this into RangeI-N lock, that resulted into a deadlock and one transaction being killed.

Question: Can we avoid or reduce these kind of deadlocks as this is not a case of change in order of access of resources? Cant' we force the transaction to get exclusive lock initially so that it blocks the other process and avoid deadlock? What (adverse) effects that may have? Also could some one explain more about RangeI-N lock.

Isolation Level for this was "Serializable".

View 2 Replies

DataSource Controls :: Recreate Deadlock In A Sql Server 2008 Database?

Jan 12, 2010

a script which creates a deadlock in a Sql Server 2008 database?I want to do a trace in a customer environment using a trace flag but first I want to test it in my own environment.

View 4 Replies

SQL Server :: Getting Timeout Error On SQLBulkCopy?

Nov 8, 2010

Using sql server 2005 and vb.net 2005.I'm creating a .net console application where I am doing a SqlBulkCopy from a non-sql server db to a sql server db table and on the call for the bulk insert:

[Code]....

I'm getting a time out error after around 1 minute, however I set BulkCopyTimeout (see above) to 100 minutes, the error:

<ERROR>

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

</ERROR>

Has anyone experienced this and how to fix this or how do I change the timeout so I dont get this error?

View 1 Replies

DataSource Controls :: Sql Server Deadlock / Only Inserting/updating Data Into A Table

Jun 11, 2010

I m getting following error in my eventvwr . I couldnt find reasons of the following error.

"Transaction (Process ID 110) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. "

The only thing my page is doing is inserting/updating data into a table in sql and the thing I can think of is because multiple users are using the same page to insert/update data? Will that cause deadlock?

View 4 Replies

DataSource Controls :: Facing Alot Of Sql Deadlock In My Event Handle On Server Computer?

Jan 18, 2010

I would like to know how deadlock is happen, i have facing alot of sql deadlock in my event handle on server computer.

View 3 Replies

ADO.NET :: Sqlbulkcopy Not Working For Default Value Of Table In Sql Server 2005?

Oct 22, 2010

i am facing problem in sqlbulkcopy function.

in database i have one ID column in where i am generating unique id through db function.

now for insert query its working properly but when i am using Sqlbulkcopy the default value fuction not executing.

View 3 Replies

SQL Server :: Communication Buffer Resources With Another Process And Has Been Chosen As The Deadlock Victim. Rerun The Transaction

Nov 15, 2010

While updating table Un handled exception was raised (asp.net with c# and SQLServer 2005)

Error Message: "Transaction (Process ID 91) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

View 2 Replies

DataSource Controls :: Import A Table From Sql Server 2000 To Another Server Qsl Server 2005?

Feb 9, 2010

I have to programmatically import a table from a database "A" in Sql Server 2000 to a database "B" in another server 2005.

View 1 Replies

SQL Server :: Database Conversion From Sql Server 2000 To Sql Server 2005?

Jan 14, 2011

I want to convert sql server 2000 database into sql server 2005 database. I am using sql server 2005 express.

I am trying by taking backup/Restore method, but it not work.

View 1 Replies

DataSource Controls :: LDF File Increasing When Move From SQL Server 2000 To SQL Server 2008

Apr 2, 2010

I have 5 GB data, when I move from SQL server 2000 to 2008 with Import and Export wizard, my LDF size is increased to 30 GB, Can I reduce my LDF file or move. In my one of the table contain around 20 Lakh data which i have normalized in 2008 and create 4 tables, so my data is entering in normalized form in 2008. But due to size by hard disk is full. I have used shrnik command but it reduce to only 1 GB.

View 5 Replies

DataSource Controls :: Convert DTS Package From SQL Server 2000 To SQL Server 2005?

Jul 1, 2010

How can convert DTS package from SQL Server 2000 to SQL Server 2005

View 2 Replies

DataSource Controls :: SQL Server - What Is Difference Between SQL Server 2000 - 2005 And 2008

Mar 24, 2010

Does anyone know, what is difference between SQL Server 2000, 2005 and 2008?

View 3 Replies

SQL Server :: What Are Features Included / Comparision Between Sql Server 2000 - 2005 And 2008

Oct 18, 2010

Could anyone tell me the features comparision between sql server 2000, 2005 and 2008 in the table format like below. sql server 2000 features | Extra features added/supported in 2005 | Extra features supported in 2008

View 2 Replies

SQL Server :: Reading Text File Using Sql Server 2000 - 2008

Sep 22, 2010

how to read the data's in the text file using sql server 2000 and 2008. i have a text file in a server and it contains one column name with the multiple column values i need to read that informations and i need to update in a table in the database.

View 2 Replies

DataSource Controls :: Difference Between Sql Server 2000 Sql Server 2005?

May 27, 2010

wt is the difference b/w sql server 2000 sql server 2005

View 4 Replies

SQL Server :: Web Developer Express 2010 Supports Server 2000?

Apr 1, 2011

Iam using web developer express 2010. I was wondering if the web developer 2010 express supports SQL Server 2000. I know i could connectSQL server 2005 and up but is it possible i could connect sql server 2000 to web developer 2010 express?

View 4 Replies

Server Application Unavailable In IIS 5.0 With Window Server 2000?

Feb 5, 2010

My application is in .NEt Framework 2. 0 and which i have deployed in window server 2000 . when i run this application it gives me error like . server application unavailable .

View 5 Replies

Developing With SQL Server 2005 And Deploying To SQL Server 2000

Nov 16, 2010

I'm currently developing a web application using SQL Server 2005, ASP.Net MVC, ASP.Net SQL Membership Provider (for authentication and authorisation), and Linq to SQL. Everything works great and is running as planned in the development environment.However, the production environment has a SQL Server 2000 installation, and we are unable to obtain a copy of SQL Server 2000 to use in development.Upon deploying the web application to the the production environment, what options do I have for migrating the database (schema + data) from 2005 to 2000?

View 2 Replies

SQL Server :: Data Migrations From Sql Server 2000 To 2008?

Sep 1, 2010

some good links / tutorials for migrating data from sql server 2000 to 2008 using SSIS

View 3 Replies

SQL Server :: Comparison Between SQL Server 2000 And SQL Server 2005?

Jan 13, 2011

the difference between SQL Server 2000 and SQL Server 2005 features.

View 3 Replies

SQL Server :: Trying To Connect Sql Server 2000 Using The Sql Server Utility?

Nov 26, 2010

I am trying to connect my sql server 2000 using the sql server utility. It is perfecly working fine on my system but when try it on some other system i am getting an error message as "Could not find the server".

Is there any other configuration change that i need to make? I am connecting using TCP/IP

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved