The Table Mappings pane contains one row for each remote table. A remote table is mapped if a consolidated database is selected and the mapping direction is either Bi-directional, Upload to Consolidated Only, or Download to Remote Only.
The values in the columns show the values you chose in the Create Synchronization Model Wizard, or the wizard's defaults if you did not make a choice. You can modify these values on a table-by-table basis by editing this table.
The Table Mappings pane contains the following columns.
Ordinal column This column has no title. It numbers the gridlines in the table. If you change the sorting of the tables (by clicking column headings), the grid numbers do not change with the reorder. Icons appear in this column if a remote table has been added, marked for delete, or modified.
Status column This column notifies you if there is an error, warning, or informational message for the table mapping. If an icon appears in this column, select the table mapping, and then open the Status tab in the Details pane to see the content of the message.
Remote Table column This is the remote table that you are synchronizing in the remote database. The name of the remote table owner is included in parentheses.
You can mark a remote table for deletion by right-clicking the row in the Table Mappings pane and choosing Delete. The remote table is deleted when you save the model. Deleting a remote table means that it is not created when you deploy to a new remote database. See Modifying how deletes are handled.
You can add a remote table using the Create New Remote Tables window. See Modifying the remote database that your model creates.
Mapping Direction column The direction of synchronization. The direction can be Not Synchronized, Bi-directional, Download to Remote Only, or Upload to Consolidated Only.
If the table mapping direction is Not Synchronized, then the table is still part of the remote database schema. When the model is deployed, the table is created on the remote, but no information will be synchronized to it. See Modifying table and column mappings.
If you don't want the table to be created on the remote, delete it from the model. See Modifying how deletes are handled.
Consolidated Table column This is the consolidated table that will be synchronized with the corresponding remote table. Synchronization occurs between these tables and the tables in the Remote Table column. You can change the consolidated table by clicking the column and choosing a different table from the list of consolidated tables.
Look at the Column Mappings tab in the Details pane to check how the remote columns are mapped to the consolidated columns for the selected table mapping.
Download Type column You can view and modify the implementation in the Download Type tab in the Details pane. Your options in this column are:
Timestamp Data is downloaded only if it changed since the last download. When using timestamp-based downloads, each consolidated table must have a timestamp column to track when changes are made to rows. This can be done by adding a column to the consolidated database tables or by creating shadow tables. Shadow tables are created with the same owner as the base table. When you choose Timestamp, the necessary objects are generated for you. See Timestamp-based downloads.
Snapshot All data in the consolidated table is downloaded in every synchronization, even if it has already been downloaded. See Snapshot synchronization.
Custom Write your own download_cursor and download_delete_cursor scripts instead of having them generated automatically. You can do this on the Events tab. See Writing download_cursor scripts, and Writing download_delete_cursor scripts.
Download Deletes column If this checkbox is selected, data that is deleted on the consolidated database is deleted on the remote databases.
If you are using timestamp-based synchronization and this column is selected, the deletions on the consolidated database need to be recorded. There are two ways of doing this: using shadow tables (the default), or using logical deletes. Open the Download Deletes tab in the Details pane to view and modify the implementation.
If you are using snapshot downloads and this column is selected, all existing rows in the remote database are deleted before the downloaded rows are added.
This option cannot be selected if the download type is Custom. In that case, you must write your own download_delete_cursor script. You can do this on the Events tab in the Details pane.
Download Subset column Your options in this column are:
None Download the same data to each remote database.
User Each synchronization user (also known as a MobiLink user) only downloads rows where the user name matches a column from the same table or a directly joined table. You can view or modify the implementation on the Download Subset tab in the Details pane.
Remote Each remote database only downloads rows where the remote ID matches a column from the same table or a directly joined table. You can view or modify the implementation on the Download Subset tab in the Details pane.
Custom Each synchronization only downloads rows when a SQL expression in the download cursor WHERE clause is true. This option is useful when you need multiple joins or particular business logic in your download cursor WHERE clause. You can view or modify this expression on the Download Subset tab in the Details pane.
Conflict Detection column Your options in this column are:
None Always apply uploaded updates without checking for conflicts. This option results in the best performance.
Row-based A conflict is detected if the row has been updated on both the remote and the consolidated database since the last synchronization.
Column-based A conflict is detected only if the same column has been updated for the row in both the remote and consolidated databases. Otherwise, only the uploaded column updates are applied. If a table has BLOB columns, row-based conflict detection is used instead.
See Detecting conflicts.
Conflict Resolution column Your options in this column are:
Consolidated First in wins. Uploaded updates are rejected if they conflict.
Remote Last in wins. Uploaded updates are always applied. Only use this option with column-based detection; otherwise, disable conflict detection for the same result with better performance.
Timestamp The newer change wins, using a timestamp column that you maintain. This timestamp column records the last time that the row was changed. It should exist in both the remote and consolidated tables and be included in the synchronization. To work, your remote and consolidated databases must use the same time zone (preferably UTC) and their clocks must be synchronized.
Custom Write your own resolve_conflict scripts instead of having them generated automatically. You can do this on the Events tab.
See Resolving conflicts.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|