December 17, 2008 at 12:21 am
The repliaction is in between two database one database is on srver and other one is on USB drive.
The replication is from server database to usb database.
My replication is transactional replication in SQL 2005. I have Pull subscription which runs continiously.
Most of the time that USB drive is not attached but at that time database is detached or offline.
When usb drive is attached we make that database is online or attach.
now when i reconnect that drive and make database attache. I got error message in replication monitor "Subscription have been marked as inactive and must be reinitialised"
Why this error is occured?
Is that because I attached that database after 2-3 days?
When the subscription becomes inactive automatically?
December 17, 2008 at 7:47 am
There is setting in the replication properties for how long to keep a subscription active if there is no connectivity. I believe the default is like 72 hours. You need to bump this up. I don't have replication running anywhere right now so I can't give you specific instructions on how to change it, but you should be able to find it in BOL.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 18, 2008 at 1:18 am
As an interesting side note - you can also leave your expiry time at 72 hours and just kick start replication by updating the MSsubscriptions table on yout distribution db(instead of recreating).
select * from MSsubscriptions
find your stream
update only that row - set status = 2 (2 = active)
Voila! your replication is running again
Hope this helps
December 18, 2008 at 2:29 am
On the server which houses your distribution database you will see a Distribution cleanup job. This is what is responsible for marking your subscriptions as inactive. If you have undistributed transactions which have been "waiting" for more than your expiry time (default 72 hrs) then your subscription will be expired and the pending transactions will be deleted.
So although you can update the mssubscriptions table and reactivate the subscription(s) you must be aware that transactions have been lost which you may be able to get away with depending on the nature of what it is you are doing. I would imagine this is unlikely so you would need to re-sync your subscriber, typically with a snapshot.
Having said that this is a very curious usage of transactional replication. I don't know what your volumes are but whilst your database is offline transactions are piling up in your distribution database which could have adverse effects.
December 19, 2008 at 5:18 am
Thanks.
Actually our sendond database is on USB and that usb is not always connected to machine. Thats why this problem is arising . If that usb is not attached to machine for 3-4 days that subscriber gets inactive. But now thanks for this suggession.
Please tell me I create the publisher without shedule(manually). Now when I create subscriber with option Run On Demad only. Then When the subscriber will run?
If the option is run continuously then the subscriber will pull the snapshot imideatly after generating.
But if the option is Run On Demand then when the subscriber will run?
Do we need to run it manually?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply