Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Deleting lots of records

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-02 : 09:11:40
Harold writes "Using: SQL Svr 2000

Problem: In deleting lots of records, SQL Svr suddenly goes into endless RollBack.

We found
o Turn Off - Sql Svr Agent
o Delete constraints off offending table
o Perform Delete
o Add back constraints
o Turn On - Sql Svr Agent

Anybody know a way to keep Sql Svr Agent ON w/o problems?

Is there a better way to perform delete of lots of records w/o encountering above problem?"

Nazim
A custom title

1408 Posts

Posted - 2002-04-02 : 09:15:09
you can alternatively copy the records which are not deleted from the table in a temp table , drop the original table and rename the temp table to original table.

but to do this 1) the records to be deleted should be greater then the records which are not deleted in the table
2) if there any indexes , you have recreate them.



--------------------------------------------------------------
Go to Top of Page

Jay99

468 Posts

Posted - 2002-04-02 : 09:31:47
What does the SQL Server Agent process have to do with deleting records? Are you performing the delete from a job?

Jay
<O>
Go to Top of Page

andre
Constraint Violating Yak Guru

259 Posts

Posted - 2002-04-02 : 09:53:15
quote:
Problem: In deleting lots of records, SQL Svr suddenly goes into endless RollBack.


Are you using any transactions? That would slow the process down.


Go to Top of Page

heh
Starting Member

2 Posts

Posted - 2002-04-02 : 10:20:38
quote:

What does the SQL Server Agent process have to do with deleting records? Are you performing the delete from a job?

Jay
<O>




I am performing deletes in DTS package ...

Deletes involves lots of locking and unlocking of the table and the pk index...

SSA interferes thru checking sql svr when its very busy.




Go to Top of Page

heh
Starting Member

2 Posts

Posted - 2002-04-02 : 10:36:18
quote:

quote:
Problem: In deleting lots of records, SQL Svr suddenly goes into endless RollBack.


Are you using any transactions? That would slow the process down.




Yes the table is transactional.
But during the time of the deletes, no live processing is occuring, it is maintenance time.

Go to Top of Page
   

- Advertisement -