Preparation Conditions
1, 2 servers
2. WINDOWS SERVER 64bit +
3. SQL SERVER R2 +
4, MSSQLServer service and Mssqlagent service in normal operation
three-step song
The first step is to configure the distribution server
Second step to configure the publishing server
Step three Configure Subscribers
Little Tricks
1, in general, the Distributor and the Publisher on the same server on the same instance, can also be different instances, the same can be different servers, and subscribers exist on a separate server. There are 1-to-many relationships between a publication and a subscription, and 1 publications can have multiple subscriptions at the same time.
2, the configuration Subscriber can be configured at the publisher, or at the Subscriber configuration, there is a difference between the login account of the server. If you configure SQL Server to be able to log into subscribers directly at the Subscriber, you need to configure the distribution and publisher login accounts. If configured at the Publisher, you can log on directly to Publisher SQL Server, and you need to configure the subscriber's login account.
3. When you cannot access another server, you can set the IP server name in the Hosts file. Enter C:\Windows\System32\drivers\etc, open the Hosts file, and add "192.168.1.1 server_name".
4. When using a Windows account, you need to set up user mappings in your SQL Server login account.
5, Mssqlagent need to enable, in the server properties---security to enable the server proxy account, the proxy account can click on the right "..." button to add.
6, must guarantee MSSQLServer service and Mssqlagent service has been started.
Publication and subscription in MSSQL replication