Now make sure that the domain user configured in Article 2 has access to this
PublicationSo we need to add this user
SQL ServerAnd can manage and publish this
Publication. Open our
SQL Server, Expand
SecurityFolder and right-click
LoginsSelect
New Login...
InLogin-NewOn this pageSyncdomain/syncuserUser inputLogin NameText Box.
InSelect a pageSelectUser Mapping, SelectParksurveyDatabase, and then clickOK.
BackSQL ServerTo expandReplicationAndLocal publicationsFolder, right-click the published publication =>Parksurvey: parksurveypublicationThen selectProperties.
InPublication PropertiesOn this page, we can see that we are creatingPublicationIf you want to modify them, you can directly modify them here instead of creating a newPublication.
InSelect a pageSelectPublication access listThe user with the permission to create a synchronization snapshot is displayed on the right.
ClickAddOpenAdd publication accessThis page only maps the configuration above to thisPublicationWill be displayed. ClickOKAdd it to the list.
BackPublication PropertiesOn this pageSelect a pageSelectSubscribe optionsHere I want youLimit concurrent processesSetTrueAnd then you needMaximun concurrent processesSet the attribute value to 10. Why is this setting? If you have thousands of subscribers, when they synchronize database servers at the same time, the server may be suspended. When we set the value to the above, when we merge and copy more than 10 clients, the excess parts will be automatically arranged in a queue waiting for other subscribers to complete the subscription. Of course, this value does not have to be set to 10. You can test your server and gradually increase the number of subscribers that synchronize the server database at the same time to obtain an optimal balance.
InSelect a pageLast item in the navigation barData partitionsWhen the subscriber tries to synchronize data, the snapshot information is automatically listed here. When the subscriber sends differentHostnameWhen you synchronize different data values, this information will help us improve and reduce the initial data synchronization time.
Finally, let's take a look.Select a pageOnFilter rowsHere, we only created a cities table with one parameter filter and a Parks table connected to it through cityid, but I still have a survey table to do this, the special feature of this table is that I don't want a subscriber to modify its data. I just want the subscriber to synchronize its data. What should I do if I use a filter condition?
ClickAddAnd then selectAdd filter...Add filterPage, selectSurveyTable, inFilter statementIn the text box, we enter filtering conditions.0 = 1This is perhaps the easiest way to create a table that is only for replication and does not provide merging.
ClickOKThen we can add the survey tableFiltered tablesIn the list, click to select it, and you willFilterIn the text boxWhere 0 = 1.
So far, we almost traverseParksurveypublicationEvery attribute of, I think you must have a certain understanding of them when you clickOKButton to submit all changes. When the changes you submitted are saved, a prompt box is displayed on the page asking if you want to generate a new snapshot. ClickYes.
If the previous operation fails to generate a new snapshot, you canParksurveypublicationRight-click and selectView snapshot agent statusClick here to start creating a snapshot orStopYou can also clickMonitorTo monitorPublicationStatus Bar will respond to the actions that occur after you click these buttons in real time.
ClickMonitorTo startReplication MonitorAs shown in.
This tool will displayPark survey publicationThe displayed subscription status can be seen from the above interfacePublicationThe number of subscribe times (one row represents a subscription). You can also see the subscriber's synchronization method and the time it takes for synchronization. Only merging and replication can provide such a variety of tools.RDA,Web Service,DatasetSuch a tool cannot be found in the built system.
Check whether a publication has been created
If you have successfully created a publication, you will see the following tables in the database you published and copied. In this example, parksurvey | tables | system tables:
• Msmerge_contents
• Msmerge_current_partition_mappings
• Msmerge_generation_partition_mappings
• Msmerge_genhistory
• Msmerge_past_partition_mappings
• Msmerge_tombstone
• Msmerge_indentity_range (if you use auto-increment columns)
• Msmerge_conflicts_info
You can manually rebulid the indexes of these tables, right-click indexes, select rebuild all, and click OK. It is recommended that you perform this operation once a week, you can create an SQL Server Job to perform this operation.
So far, if you have configured SQL Server mobile tools, you can use this copy. I wish you a good time. The next article is how the. NET Compact framework uses this replication.