Showing posts with label solve. Show all posts
Showing posts with label solve. Show all posts

Friday, March 23, 2012

Replication can solve may problem ?

Hi,
In my db I have a big table with at least 40 millions rows.
In fact my appz soffer about performance and I had to put
offline the oldest data.
I keep online only the last 6 monthsm and I copy the oldest in
some tables with data costraints...
I mean I have a table called "TbPrices" and then I have
TbPrices_2003_12,
TbPrices_2003_11
and so on.
I think to use a replication db to have the entire archive with a clustered
view and
the OLTP with the last 10 days online.
But I don't know how replication works because I don't want to delete the
record in
the destination.
Thanks
You can use replication for this but you have to be careful.
I am confused by what you mean by a clustered view? Do you mean an indexed
view, or perhaps a distributed partitioned view?
Replication can be used to replicate a subset of data to an archive table,
ie only replicate data older than 6 months perhaps.
You should use a date filter to only replicate data which is less than 6
months old. Then when you are creating your publication ensure that you use
the 'delete all data which matches the row filter clause' you can find in
the specify articles dialog of the create publication wizard. Click the
three ellipses to the right of your article name, and select the snapshot
tab. In the name conflicts section select this option.
This will ensure when you reinitialize the archived data on your subscriber
is not wiped out.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"opianeta" <opianetaNONMISPAMMAREPLEASE@.yahoo.it> wrote in message
news:7R0Xc.458$v24.9883@.news.it.colt.net...
> Hi,
> In my db I have a big table with at least 40 millions rows.
> In fact my appz soffer about performance and I had to put
> offline the oldest data.
> I keep online only the last 6 monthsm and I copy the oldest in
> some tables with data costraints...
> I mean I have a table called "TbPrices" and then I have
> TbPrices_2003_12,
> TbPrices_2003_11
> and so on.
> I think to use a replication db to have the entire archive with a
clustered
> view and
> the OLTP with the last 10 days online.
> But I don't know how replication works because I don't want to delete the
> record in
> the destination.
> Thanks
>

Wednesday, March 7, 2012

Replication - Conflicts

Hello,
I read in articles that there can occur two kinds of conflicts during
replication and that the SQL Server Reconciler solve such conflicts:
1) If more subscriber try to modify a row on the publisher database at the
same time.
2) If a certain row is modified at the subsriber database as well as the
coresponding row at the publisher database. So any one of those two have to
win and the other win will accept the changes of the other side.
So how does it look like when the Reconciler solve these two conflicts. How
does it work?
thx
rob
Hello,
Sorry that I posted the same question twice but it was accidentally. But
unfortunately this information is very important for me. Does no one knows
how the SQL Server Reconciler solves these conflicts (propagated by Hilary
Cotter)?
1) primary key collisions, where the publisher and subscriber enter a row
with the same value for the primary key between merge agent runs
2) a row is updated on the publisher or subscriber and deleted on the
subscriber or publisher. When the merge agent runs it attempts to update a
row which no longer exists.
3) you update the same row on both sides of a replication solution and do
not have column level tracking enabled for your publication.
Thank you very much in advance.
Regards
mat