January 21, 2014 at 8:03 am
I have transactional replication set up, running good, we need to stop replication for 1 hour, extract data, then restart replication.
Questions:
1.- Do I need to stop only the subscription job?
2.- If I start that job again(Subscription) after 1 hour, does it loose transactions?.
3.- Do I need to run the snapshot agent everytime I stop/start the subscription job?
Appreciate your help as always.
Thanks
Oscar PAblo Campanini
January 21, 2014 at 9:04 am
If you are looking to pause the flow of transactions from the distributor to the subscriber, then yes, all you would need to do is stop the subscriber job (distribution job or Synchronization job). The transactions will happily queue up in the distribution database for a default period of 72 hours. Once you restart the distribution job, the subscriber will catch up. it may not be entirely instant, if you have a large number of transactions to catch up on. Also, you should make sure the distribution database has room to grow, in case it needs to. I will bet that over the course of an hour it will not, but you should make sure.
January 21, 2014 at 9:41 am
Pablo Campanini-336244 (1/21/2014)
1.- Do I need to stop only the subscription job?
That's the easiest way. If you were to stop the log reader it would have the same effect but would potentially mean the transaction log would grow.
Pablo Campanini-336244 (1/21/2014)
2.- If I start that job again(Subscription) after 1 hour, does it loose transactions?.
No. All transactions marked for replication would be read and commited to the distribution database by the logreader
Pablo Campanini-336244 (1/21/2014)
3.- Do I need to run the snapshot agent everytime I stop/start the subscription job?
No. For the very reasons above (the distribution db exists for a reason!). If that was a requirement it would be unmanageable and mean every bit of maintenance would require re-initialisation.
Is there a reason why you need to stop replication? It could be more beneficial to leave it on if its for data changes.
January 21, 2014 at 9:47 am
Thank you for your help, it clarifies the process for me, now here a better questions:
Transactional replication is on....
1.- If I want to add a table that was not replicating before, what would be the best scenario?.
2.- Do I have to run the Snapshot to catch the new DDL for the new table?
Thanks
Oscar Pablo Campanini
January 21, 2014 at 10:20 am
You are safer adding it via TSQL. You need to run sp_addarticle and sp_addsubscription. Then you need to run the snapshot agent.
Sp_addarticle adds the table to the publication. At this point nothing happens as the subscribers aren't aware of it
Sp_addsubscription adds the new article to the subscribers. This can apply to all subscribers or you can be granular and run it for single articles and subscribers.
The snapshot agent will generate the schema script and bcp the data of ONLY the new article.
February 11, 2016 at 9:39 am
Hi,
I have a question, i am managing 2 SQL servers
1 is Master Server (Publisher + Distributor)
2 is Client Server (Subscriber)
client basically owned by a client who is buying data from us.
Both Servers are replicated with each other
Replication type is Transactional-replication
only selected Tables of a single DB are replicated from Master-Server to Client Server.
Now i am going to tell actual problem. Basically there are several problems i want to discus
Problem 1:
When i add or delete any data table and take snapshot of replication than all db vanishes from customer side and after that it rebuilds in 20-30 minutes (have limited access so don't get logs)
Problem 2:
When i reinitialize subscription than it takes lots of time to completing it and showing partially applied scripts of tables in monitoring.
Problem 3:
Publisher to Distributor showing high commands and transactions count but actually on distributor to subscriber commands and transaction counts are more than 100's of times lower as compare to publisher section.
Problem 4:
Latency is Very high between Publisher-Distributor (around 5+ minutes)(Server-1) and jumps to 7 minutes then automatically less and stay on some seconds but average is really very high. Distributor-Subscriber latency seems fine.
Problem 5:
Log Size of Master DB increases and occupying space around 3.5 GB (Normally 3 GB with 80-87% free space) whether Data File Size also increases and now it's 4 GB+ (Normally 3.3 - 3.5 GB)
Really Appreciate Your Suggestions and Guidelines.
Thanks in advance,
Hassan
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply