原文:http://database.itags.org/sql-server/157556/
These 7 columns are used for tracking inserts and updates in the table. The tracking is required to identify the data that has changed for synchronization with the data in SQL Server. These are system columns and used only for replication of data. The description of the columns is as given below:
Col Name | Type | Description |
__sysIG | INTEGER | The local generation at which the row has been inserted. |
__sysCG | BIGINT | The generation of the change |
__sysCD | DATETIME | The time and date the change occurred. |
__sysP1 | VARBINARY | Custom Property |
__sysMC | VARBINARY | The bitmap of the changed columns |
__sysMCS | VARBINARY | The bitmap of the changed columns, saved for change forwarding between sync partners. |
__sysSR | VARBINARY | Server Reference |
Apart from the 7 systems columns that are added to each SQL Mobile table which has data replicating with SQL Server, there are 3 systems tables - __sysTrackedObjects, __sysRowTrack, __sysDeletedRows. The systems tables are used as following:
__sysTrackedObjects : Holds information about various tracking related objects, such as sync partners, tracked tables, tracked columns, properties etc.
__sysRowTrack : Contains change information about rows and columns currently, it only contains information about rows deleted from user tables.
__sysDeletedRows : Contains temporary information about deleted rows. This information is merged into the __sysRowTrack table upon beginning of a sync
The __sysDeletedRows table holds the information about the deleted rows
The __sysMC column will have a value, which is like 0x000....80, if change is sent to the server, if not, it will have 0x00....81.