SQL Server improves transactional replication efficiency Optimization (iii) subscription initialization optimization

Source: Internet
Author: User

Initializing a subscription is primarily a snapshot generated by the Distribution Agent before the Snapshot Agent is distributed and applied, so the optimized body is the Distribution Agent. 1. Initializing subscriptions
    • First create a local subscription, the Publisher, Distributor, and Subscriber are on the same server, just to test the production environment do not do this

    • Distribution Server Parameter configuration

    • Initialize subscription run time

Several points to note:
    • The Snapshot Agent actually executes a BCP program that generates a snapshot file:

    • The Snapshot Agent uses locks during the initial phase of snapshot generation, albeit with a short time, but with a large range of effects.
    • You cannot make changes to the structure of a table during snapshot generation.
2. Optimized parameter testing
    • Create a new Distribution Agent configuration file named "Distribution Agent tuning Parameters"
    • Find the profile_id for this agent configuration file
SELECT *  from WHERE = 3  EXEC @agent_type = 3       
    • Modifying a configuration file
EXECSp_change_agent_parameter@profile_id =  -,    @parameter_name = 'MaxBCPThreads',@parameter_value = 4        EXECSp_change_agent_parameter@profile_id =  -,    @parameter_name = 'BcpBatchSize',@parameter_value = 100000                             EXECSp_change_agent_parameter@profile_id =  -,    @parameter_name = 'PollingInterval',@parameter_value = 500000
    • after optimization Subscription Library Generation The test results show no significant optimization from the test results. MaxBCPThreads does not implement multi-threaded data import, background query only one session in the execution of bulk in operation, bcpbatchsize on the parameters of small, the proposed setting is larger; the other two parameters do not affect the efficiency of the subscription database generation. In fact, subscription library generation is the entire process of performance bottlenecks, if you can use multithreading or a good solution, I hope to see the blog students have a good way to provide.

SQL Server improves transactional replication efficiency Optimization (iii) subscription initialization optimization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.