UltraLite global_database_id option

Sets the database identification number.

Allowed values

Unique, non-negative integer

Default

The range of default values for a particular global autoincrement column is pn + 1 to p(n + 1), where p is the partition size of the column and n is the global database identification number.

Remarks

To maintain primary key uniqueness when synchronizing with a MobiLink server, the global ID sets a starting value for GLOBAL AUTOINCREMENT columns. The global ID must be set before default values can be assigned. If a row is added to a table and does not have a value set already, UltraLite generates a value for the column by combining the global_database_id value and the partition size. See Using global autoincrement.

When deploying an application, you must assign a different identification number to each database for synchronization with the MobiLink server. You can change the global ID of an existing database at any time.

You can also set this option using the ulinfo utility:

ulinfo -g ID ...

To set the global_database_id option from a client application, use the set database ID function for the programming interface you are using.

See also
Example

To autoincrement UltraLite database columns from 3001 to 4000, set the global ID to 3.

SET OPTION global_database_id="3";