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 2005 Forums
 Replication (2005)
 How to delete 500M rows from a replicated table

Author  Topic 

goodsolution
Starting Member

38 Posts

Posted - 2009-05-18 : 23:10:13
Hi all,
I have Transactional Replication between 2 tables called TableA and TableB. Tables are having OLTP data. Now i want to delete 500M million records from tableA so that it should replicate in TableB, so what is the best approch to delete 500M million records with out affecting any OLTP data.

-Thanks

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2009-05-18 : 23:31:57
How many rows are in the table? Drop the article from subscription and add it back.. the snapshot agent will drop the table on the subscriber and push the data into it.

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-05-18 : 23:42:03
Just do the delete in small batches.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -