Unix Technical Forum

Deletion old data in replication environment

This is a discussion on Deletion old data in replication environment within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi to all I have a question about deletion of amount of data: My production environment is this one: ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 09:14 AM
Marco
 
Posts: n/a
Default Deletion old data in replication environment

Hi to all

I have a question about deletion of amount of data:

My production environment is this one:
- one publisher with a database (historycal events)
- 50 subscribers with the prev database in unidirectional replication
unidirectional (from subscribers to publisher)

My target was capturing events from the subscribers to send them to
publisher (later I can do reports on it).
Once the data is on the server i don't need them any more in subscribers.

Now I would like to delete the oldest data (year 2003) of some table on the
publisher (remember that replication is unidirectional S->P).

The tables contain about 6-7 millions of records.
I delete one month per time. The process is about 30 minutes long and the
merge agent subscribers changes in retry state.

Can I use these queries to make faster this process? Eventually what kind of
problems can I have ?
DELETE FROM mydb WITH (PAGLOCK) WHERE mydb.dbo.mydate Between date1 and
date2
or
DELETE FROM mydb WITH (ROWLOCK) WHERE mydb.dbo.mydate Between date1 and
date2

Thank you very much for your support.

Marco


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com