This template enables you to create the stored procedures that enumerate, insert, and update data and metadata in the server database. To create procedures, find and replace the strings below with the appropriate values for your database:
- Change [basetable] to the name of the base table, e.g. orders 
- Change [trackingtable] to the name of the tracking table, e.g. orders_tracking 
- Change [bt.allcols] to a list of the columns in the base table (bt), e.g. bt.order_id, bt.order_date 
- Change [bt.pk=tt.pk] to join the PK columns in the base table (bt) with those in the tracking table (tt), e.g. bt.order_id = tt.order_id 
- Change [bt.nonPkCols] to a list of columns in the base table that are not PK columns, e.g. bt.order_date 
- Change [@allcols_with_datatype] to a list of columns in the base table, as sql variables along with their datatypes, e.g. @order\_id int, @order\_date datetime 
- Change [pkcol= @pkcol\] to match PK columns with their corresponding sql variables, e.g. order_id = @order\_id 
- Change [allcols] to a list of columns in the base table, e.g. order_id, order_date 
- Change [@allcols] to a list of columns in the base table as sql variables, e.g. @order\_id, @order\_date 
- Change [@pkcols_with_Datatype] to a list of PK columns in the base table as sql variables along with their datatypes, e.g. @order\_id int 
- Change [set_allcols_except_PK] to assign values to all non-PK columns from their corresponding sql variables, e.g. order_date = @order\_date 
- Change [tt.pk=@pk] to match PK columns in the tracking table with their corresponding sql variables, e.g. tt.order_id = @order\_id 
- Change [pkcols] to a list of PK columns in the base table, e.g. order_id 
- Change [database] to the name of the database that contains the base table e.g. peer1 
- Change [ScopeTableMap] to the name of the table that stores the scope-to-table mappings, e.g. scope_table_map 
请参阅
其他资源
How to: Provision a Server Database for Collaborative Synchronization (Non-SQL Server)