Database read/write separation

Source: Internet
Author: User

SQL Server provides a variety of mechanisms for read and write separation, which only describes how to publish and subscribe, because bloggers only use this form, and the new features in SQL Server 2012 always on are also implemented. Snapshot publication snapshot replication is the process of copying and distributing data exactly as it appears in the presence of database objects. Snapshot replication does not require continuous monitoring of data changes, because changes to published data are not propagated incrementally to subscribers, but are periodically replicated. A. Local publishing: To start SQL Server Agent 1.MyBookShop is the primary database, Mybookshop_r is a database of synchronized databases, it can now be seen that the main database two more data than the secondary database, and now we put these two data through the publication of the snapshot of the past.  2.3. 4.5. 6. You can set the run time in the "plan to run the Snapshot Agent at next time", the snapshot is not the real-time synchronization update database, so you can set a time, or do not set, synchronization only once on the line. 7. Click Security Settings 8. 9.10. 11.12. 13. Create success B. Local subscription 1. 2.3. 4.5. 6.7. 8.9. 10.11. 12.13. 14. Refresh display Subscriptions 16. Re-query the database to see if there is any synchronization. Note: If the primary database adds data, the secondary database does not synchronize in real time, unless the agent is restarted or the time of the job execution is synchronized again, and if you want the data to be synchronized in real time [there will be a few seconds delay No absolute real-time synchronization] to the secondary database on the use of things to publish instead of snapshot publishing transactional publishing transactional publication method and snapshot publication is basically the same, the transactional publication can update the data in real time, when adding, modifying or deleting a piece of data, the changes on the primary database are synchronized to the secondary database "a few seconds delay"; Transactional publishing can realize the separation of read and write, the main library publishing transactions, multiple secondary library subscriptions, the secondary library to be set to read-only mode;

Database read/write separation

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.