Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Deleting Large Number of Records


Deleting Large Number of Records

Author
Message
Indianrock
Indianrock
SSC Eights!
SSC Eights! (852 reputation)SSC Eights! (852 reputation)SSC Eights! (852 reputation)SSC Eights! (852 reputation)SSC Eights! (852 reputation)SSC Eights! (852 reputation)SSC Eights! (852 reputation)SSC Eights! (852 reputation)

Group: General Forum Members
Points: 852 Visits: 2258
Great discussion and helpful solutions.
1) many of us are a little too touchy about critiques of our code
2) tell your management how much disk space you need to run sql server and that it's a cost of doing business. Otherwise tell them to use a pencil and notepad to keep track of data. So many posts about shrinking files, "ballooning" log files etc etc. Just buy the danged disk space and suck it up.

3) I don't know if this is a trend, but in our shop backups were turned over to the systems team using Commvault. Any backups done outside of that product could break the log chain. Naturally this severely ties my hands. Also, any change in recovery model will cause Commvault to react according to it's programming, often causing an immediate full backup.

4) You "could" go to simple recovery on a production database, but if the company asks you to restore to a point in time, and you can't do it because you stopped transaction log backups, you might be looking for another job.
I've actually considered changing modes during our weekend maintenance because Commvault can't keep up and it's log backups are now occasionally finishing many hours apart, rather than the scheduled 15 minute interval. But I'm hoping this will give me the ammunition I need to establish weeknight maintenance windows so it's not all done on the weekend.



jts2013
jts2013
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1170 Visits: 5009
A great article - my only concern is that out production database is replicated to two other servers and log shipped to a third, so you couldn't use this process as is without breaking the log chain. But I think I can use the general gist of the process to only delete X rows at a time, by putting the delete code into a SQL Agent job and setting it to run every say 10 minutes e.g. to delete a million rows, you could have a job that deletes 10,000 rows and have it run 100 times.
banda.sai
banda.sai
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 26
http://www.sqlperformance.com/2013/03/io-subsystem/chunk-deletes
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/52e6be98-6165-4b1e-a926-5d5609ab8486/delete-large-number-of-rows-without-growing-the-transaction-log
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search