SQL Server 2012 local publishing solutions subscriptions and related issues

Today, just learning to read and write in separate databases (master-slave separation), originally installed on your computer is the Express version of SQL Server2012 in the database - at> Copy, only local subscription, no local release, we can only put this version of the database deleted, and put on the Enterprise version.

After waiting Bahrain database, access to the database on the following page

 

 

 

 

Local publishing and have local subscriptions, separated from the main database in order to achieve this, we also need to open the SQL Server Agent server, open the local computer service, start the SQL Server Agent service (default is not activated)

 

 

 

 

Start End service will be able to implement the functionality we want, first of all, we create two databases TestA (to do the main database) and TestB (as from a database),

The role of the primary database is generally used to add, delete, change operation

From a database can have multiple, usually used to query operation because 80% of the general might visit the site query.

The demonstration carried out on the same machine.

1, a new local publication

 

 

 2, select the need to publish a database, for example in order to TestA

 

 

 3, select the type of publication transactional publication

 

 

 4, we need to put on the table selected (example only creates a table)

 

 

 5, if necessary, you can filter the table rows

 

 

 6, creating a snapshot proxy

 

 

 7, select the Snapshot Agent security settings

 

 

 

 

 

 8. Fill in name, will be displayed in a local release

 

 

 9, bringing the local release a new complete (displays the name written in the local release)

 

 

 10, followed by a new local subscribers (New Subscription Right to TestB for example)

 

 

 11, check the publisher (there are several options, the machine follows)

 

 

 12, if the machine is not an option (for example, look for SQL Server Publisher)

 

 

 13, the Distribution Agent location

 

 

 

Note: Here we select push subscription

When there is a change of data in the database, it will notify the individual updates from the database by subscribing and publishing system

1, from the database periodically poll the master database, the master database in increments acquisition script execution (performance degradation) after

2, when the master data is updated database, the primary database script automatically increment data pushed to perform each database (high performance, this is what we use)

14, choose the subscription server, it is an example of our TestB

 

 

 15, set up security

 

 

 

 

 

 16, bringing the local subscription publishing success

然而,却出现问题了,在本地订阅中并没有显示发布成功的数据库

通过一步步查看,在我们刚创建的本地发布中,右键‘查看快照代理状态’

 

 发现ReplData文件夹下,访问被拒绝,因为需要给它设置一个Everyone的权限

 

 这时候重新启动代理,就可以顺利启动了

 

 本地订阅也可以显示了,并且数据顺利同步过去了

 

 

Guess you like

Origin www.cnblogs.com/shenghuotaiai/p/12057043.html