Monday, March 12, 2012
Expiring and Reinitializing Subscriptions
SQL2005 SP1
Subscriber:SQL Server Express
Tablet XP SP2
If I have a subscription retention of 20 days and a subscriber never
misses a 20 day window; aka they never "expire" because they always
replicate within the retention period, what happens to the replication
meta-data? Is the meta-data ever cleaned up in this case or does it
grow and grow because the subscription never exceeded the retention
window?
Also, If I have no expiration for my subscribers - not recommended I
know - is there any way to purge the history? Would reinitializing
the subscription clean things up -or- because there was no expiration,
would it keeps everything and grow, grow, grow regardless of a
reinitialize?
They are purged as they fall out of the conflict retention and merge
metadata retention windows.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Crash" <sourcenexus@.san.rr.com> wrote in message
news:1175191098.139401.217150@.p77g2000hsh.googlegr oups.com...
> Publisher: Windows 2000 SP4
> SQL2005 SP1
> Subscriber:SQL Server Express
> Tablet XP SP2
> If I have a subscription retention of 20 days and a subscriber never
> misses a 20 day window; aka they never "expire" because they always
> replicate within the retention period, what happens to the replication
> meta-data? Is the meta-data ever cleaned up in this case or does it
> grow and grow because the subscription never exceeded the retention
> window?
> Also, If I have no expiration for my subscribers - not recommended I
> know - is there any way to purge the history? Would reinitializing
> the subscription clean things up -or- because there was no expiration,
> would it keeps everything and grow, grow, grow regardless of a
> reinitialize?
>
|||On Mar 29, 10:08 am, "Hilary Cotter" <hilary.cot...@.gmail.com> wrote:
> They are purged as they fall out of the conflict retention and merge
> metadata retention windows.
>
Don't quite understand your statement.
Yes/No: If subscription is never expired then because I have a 20 day
retention my history will never grow beyond such as appropriate for a
20 day retention.
True/False: If I have no expiration then history will never stop
growing even if I reinitialize a subscription.
|||If you have a defined retention period metadata is cleaned up. The metadata
which is cleaned up is metadata which is older than the retention period.
So to answer your first question - Yes. If your subscription has not expired
the metadata will only be retained for whatever your retention period is -
20 days.
For subscriptions with no expiration the metadata is never cleaned up. If
you re-initialized all the existing metadata is purged and replaced with a
new set of metadata. So to answer your second question: False.
Please refer to http://msdn2.microsoft.com/en-us/library/ms151778.aspx for
more information.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Crash" <sourcenexus@.san.rr.com> wrote in message
news:1175193126.263827.280740@.y66g2000hsf.googlegr oups.com...
> On Mar 29, 10:08 am, "Hilary Cotter" <hilary.cot...@.gmail.com> wrote:
> Don't quite understand your statement.
> Yes/No: If subscription is never expired then because I have a 20 day
> retention my history will never grow beyond such as appropriate for a
> 20 day retention.
> True/False: If I have no expiration then history will never stop
> growing even if I reinitialize a subscription.
>
>
Expired Transactional Subscription Prob
So, best I can determine, we had a subscription, but it looks like it got disowned. Trying to delete the subscription gives me a "The subscription on the Subscriber doesn't exist."
I need to delete the subscription to set up a new transactional replication process. Or at least, spending a day hugging on the SQL server has made me think so. I'm running MsSQL 2K. I've tried to screw with it what ways I could glean with the EM, but I'm not getting anywhere. That and I can't find a freaking thing on error 20017 except "It don't exist, buddy."
Here's the skinny:
We have the entire customer Database on Server A. We take 2 fields from the A and replicate them per transaction to B which the Radius server runs off of. (This helps reduce traffic because we keep the A server at the office while the radius server and B server are across town). :(Cancel that one folks. When I just looked at the Server B, the subscription somehow finally dissapeared on it's own.
Expired Subscription Clean Up - REPOST
I am getting an error on Replication Monitor->Agents->Misc
Agents->Expired Subscription Clean up that reads 'Executed as user:
ROUSES.COM\Administrator. Invalid object name 'sysarticles'. [SQLSTATE
42S02] (Error 208) Invalid object name 'sysarticleupdates'. [SQLSTATE
42S02] (Error 208) Associated statement is not prepared [SQLSTATE
HY007] (Error 0). The step failed.'
What dB is this table or tables missing from? How do I recreate
them?
AHIA,
Larry...
Sounds like a publication database. For some reason there seems to be an
bogus entry in distribution.dbo.mspublisher_databases or
distribution.dbo.mspublications.
Its looking at the view in sysextendedarticlesview in a publication
database. I can't tell which one it it. Run profiler and look for the db id.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"LPR-3rd" <lreames@.gmail.com> wrote in message
news:1140014373.809026.60790@.g47g2000cwa.googlegro ups.com...
> Running SQL 2k / Win 2k
> I am getting an error on Replication Monitor->Agents->Misc
> Agents->Expired Subscription Clean up that reads 'Executed as user:
> ROUSES.COM\Administrator. Invalid object name 'sysarticles'. [SQLSTATE
> 42S02] (Error 208) Invalid object name 'sysarticleupdates'. [SQLSTATE
> 42S02] (Error 208) Associated statement is not prepared [SQLSTATE
> HY007] (Error 0). The step failed.'
>
> What dB is this table or tables missing from? How do I recreate
> them?
>
> AHIA,
> Larry...
>
Expired subscription clean up - Failed
I have a merge replicate setup and is working fine.
Suddenly since last 4-5 days my "Expired subscription clean up" stored
procedure started failing.
The error message in the job history is
Unable to connect to SQL Server '(local)'. The step failed.
Can somebody help me to resolve this issue.
Thank you
Sam
Hi guys,
I found the solution for this problem so posting it here for otheres.
http://support.microsoft.com/kb/q296792/
thanks you
Sam
"sam" wrote:
> Hi,
> I have a merge replicate setup and is working fine.
> Suddenly since last 4-5 days my "Expired subscription clean up" stored
> procedure started failing.
> The error message in the job history is
> Unable to connect to SQL Server '(local)'. The step failed.
> Can somebody help me to resolve this issue.
> Thank you
> Sam
Expired Subscription Agent is failing
to it. While I was checking the progress of the sync I have noticed that
Expired Subscription Agent is failing. The error it is giving is:
Invalid object name 'sysarticleupdates'. [SQLSTATE 42S02] (Error 208).
Has anyone got any suggestions?
This is probably symptomatic of much larger problems.
I would find a SQL Server with the same version and sp, locate
sysarticleupdates, right click on it in EM, select copy and then paste it
into your subscription database on your subscriber.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Russell" <Russell@.discussions.microsoft.com> wrote in message
news:7B52FB71-6159-4818-85EC-7216AB277473@.microsoft.com...
> I have recently setup a Merge Publication with two other servers
subscribing
> to it. While I was checking the progress of the sync I have noticed that
> Expired Subscription Agent is failing. The error it is giving is:
> Invalid object name 'sysarticleupdates'. [SQLSTATE 42S02] (Error 208).
> Has anyone got any suggestions?
Expired Subscription
looking for a hack, but if that is all you have I will try it. I was hoping
that there might be a system stored procedure that would do it, although I
know that is pretty doubtful. The reason for this is because now I have to
wait for the minimum setting of 1 day to occur before I can test how I need
to reinitialize the subscription. I would like to do this at will.
Thanks for any suggestions,
Nate
Nate,
I don't know of a way of manually expiring a subscription (apart from
changing system clocks etc), but electing to reinitialize a subscription
should amount to the same thing.
HTH,
Paul Ibison
|||Reinitializing normally, yes, it is the same as reinitializing an expired
subscription. But, there is an Expired Subscription Clean Up Agent which I
want to run to remove the subscription. From there I need to go through the
process of recreating a new nosync subscription, i think.
I believe you are correct about the system clock, from looking through some
of the MS stored procedures I see that some, like the clean up agent,
reference the time.
So, I think I will just remove the subscricption manually to emulate the
clean up agent. I'm doing merge replication and we are using push
subscriptions. If an subscription expires and is cleaned up by the clean up
agent, do you have any idea what would be the best way to retrieve the data
from the Subscriber (eg. possibly upload changes before a reinitialization,
or something like that)?
Thanks,
Nate
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OQS7dtnXEHA.3988@.tk2msftngp13.phx.gbl...
> Nate,
> I don't know of a way of manually expiring a subscription (apart from
> changing system clocks etc), but electing to reinitialize a subscription
> should amount to the same thing.
> HTH,
> Paul Ibison
>
|||this is a tricky thing to do.
the way it works is SQL Server queries the distribution history and if it is
beyond the retention period then one of the clean up procs will mark the
subscription as "expired"
To test, update your distribution history to an old date, and then run the
expired subscription clean up agent.
here is a sample
update msdistribution_history set start_time=dateadd(dd,-20,start_time),
time=dateadd(dd, -20,time) where agent_id=12
I am picking 20 days as a date which is beyond my retention period which has
a default of 14 days (334 hours). Agent_id is the particular agent_id for
the distribution agent going to the subscription you are trying to expire.
Naturally I hope and pray you are doing this in a development environment.
Another option is to set the retention period to 1 hour and wait 1hour. Do
this by right clicking on your publication selecting properties and set the
retention period to 1.
Then come back in an hour and run the expired subscription clean up agent.
"nate axtell" <naxtell at progeny dot net> wrote in message
news:ufX8g5gXEHA.3396@.TK2MSFTNGP10.phx.gbl...
> Does anyone know how to manually set a Subscription to be Expired? I'm
not
> looking for a hack, but if that is all you have I will try it. I was
hoping
> that there might be a system stored procedure that would do it, although I
> know that is pretty doubtful. The reason for this is because now I have
to
> wait for the minimum setting of 1 day to occur before I can test how I
need
> to reinitialize the subscription. I would like to do this at will.
> Thanks for any suggestions,
> Nate
>
|||I did not realize the retention period could be less than 1 day, I will take
a look at that and give it a try today. If that works I will not bother
with the history as we have other subscriptions running on our Test server.
Yes, all of my work is being done in a test environment.
thanks,
Nate
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:efzbdcpXEHA.3516@.TK2MSFTNGP09.phx.gbl...
> this is a tricky thing to do.
> the way it works is SQL Server queries the distribution history and if it
is
> beyond the retention period then one of the clean up procs will mark the
> subscription as "expired"
> To test, update your distribution history to an old date, and then run the
> expired subscription clean up agent.
> here is a sample
> update msdistribution_history set start_time=dateadd(dd,-20,start_time),
> time=dateadd(dd, -20,time) where agent_id=12
> I am picking 20 days as a date which is beyond my retention period which
has
> a default of 14 days (334 hours). Agent_id is the particular agent_id for
> the distribution agent going to the subscription you are trying to expire.
> Naturally I hope and pray you are doing this in a development environment.
> Another option is to set the retention period to 1 hour and wait 1hour.
Do
> this by right clicking on your publication selecting properties and set
the[vbcol=seagreen]
> retention period to 1.
> Then come back in an hour and run the expired subscription clean up agent.
>
>
> "nate axtell" <naxtell at progeny dot net> wrote in message
> news:ufX8g5gXEHA.3396@.TK2MSFTNGP10.phx.gbl...
> not
> hoping
I
> to
> need
>
|||I replied too quickly. I check the properties section and the period is in
Days not Hours. Is this different for you?
-Nate
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:efzbdcpXEHA.3516@.TK2MSFTNGP09.phx.gbl...
> this is a tricky thing to do.
> Another option is to set the retention period to 1 hour and wait 1hour.
Do
> this by right clicking on your publication selecting properties and set
the
> retention period to 1.
>
|||yes it is. Go to tools, replication ,configure distributors, publishers,
subscribers, and select the distributors tab. Click on properties and there
should be an option to set it at hours or days there.
"nate axtell" <naxtell at progeny dot net> wrote in message
news:OL%23LEipXEHA.1764@.TK2MSFTNGP10.phx.gbl...
> I replied too quickly. I check the properties section and the period is
in
> Days not Hours. Is this different for you?
> -Nate
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:efzbdcpXEHA.3516@.TK2MSFTNGP09.phx.gbl...
> Do
> the
>
|||Does the max distribution retention for the distribution agent affect Merge
replication? I tried to set the max to 1 hour, but i'm not seeing it make a
difference when I try to synchronize to a disconnected subscriber. I have
read that a subscriptions can be deactivated if they don't synch within the
max dist. retention period in BOL("Subscription Deactivation and
Expiration"). But, I have not found if it specifies anything about Merge
replication. Since Merge replication does not really use the distributor
(BOL: "How Merge Replication Works") I didn't think that any data change
information was kept on the distributor. So max dist retention would not
matter since there are no transactions in the distr database.
What is the link between max_distretention and merge replication; any ideas?
Thanks,
Nate
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:ecV$qJqXEHA.2408@.tk2msftngp13.phx.gbl...
> yes it is. Go to tools, replication ,configure distributors, publishers,
> subscribers, and select the distributors tab. Click on properties and
there[vbcol=seagreen]
> should be an option to set it at hours or days there.
>
> "nate axtell" <naxtell at progeny dot net> wrote in message
> news:OL%23LEipXEHA.1764@.TK2MSFTNGP10.phx.gbl...
> in
1hour.[vbcol=seagreen]
set
>
Expiration of Subscription ...
Hi,
Description: In the past I had an issue with the replication that suddenly became expired (no reason at all) and I had to re-do the whole thing from scratch. This is a transactional replication (SQL2.5K -> SQL2.5K) and the subscriber is used as warehouse where applications also inserting data (with neg. seed values for the PKs). This means applying the snapshot from the publisher is not applicable because there are data which will be lost from subscriber.
Question: Since the applying snapshot is not an option for reinitializing the subscription (initially was created without snapshot - from the backup and restore is not applicable at this stage) I need to find implementation way for two things:
1. I need subscription never get marked as expired (I did disable job "Expired subscription clean up" but still the replication can be marked as expired from the "Distribution clean up" job which I am not suppose to disable - this has different function as well - cleaning up the delivered transactions)
2. Safely dropping articles from the publication without applying snapshot to the subscriber (see reason above - num.1). If you force to drop the articles, does this mean that the subscription will be marked as expired after period of time? (This again will lead to problems as above).
Please, give me your opinion and/or best practices how to solve these problems. Other than that I am very happy with the improvements in the replication domain in SQL 2005.
Regards,
Zlatko
Hi,
1) Question 1: transactional replication uses maximum distribution retention period and publication retention period to decide when a subscription should expire. Look att BOL topic "subscription expiration and deactivitaion" on how to adjust it.
2) You can try to initialize subscription manually. For transactional replication, it means to @.sync_type to 'replication support only' when you create the subscription. Look at BOL topic" Initialize a Subscription Manually (Replication Transact-SQL Programming)" or "How to: Initialize a Subscription Manually (SQL Server Management Studio)" for instructions to setup.
Peng
Friday, February 24, 2012
Existing subscription already contains table included in the new subscription
28638
SSCE_M_DUPLICATETABLE
Existing subscription already contains table included in the new subscription.
What are the possible causes of this merge replication error?
Could it be caused by a SQL Server Compact Edition User trying to sync their .sdf file after their subscription has already expired on the SQL Server?
Would you expect to see a different message if a SQL Server Compact Edition user tried to sync a subscriber database (.sdf file) with merge replication if it's been longer than the subscription retention period since their last sync?
This happens on your resyncronization?