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
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
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment