Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Database Administration » Database Options » Introduction to database options » Alphabetical list of options

force_view_creation option [database] Next Page

global_database_id option [database]

Controls the range of values for columns created with DEFAULT GLOBAL AUTOINCREMENT. For use in generating unique primary keys in a replication environment.

Allowed values





Can be set for the PUBLIC group only. DBA authority required.


The value you specify for this option is the starting value. For columns created with DEFAULT GLOBAL AUTOINCREMENT, when a row is inserted into the table that does not include a value for the DEFAULT GLOBAL AUTOINCREMENT column, the server generates a value for the column. The value is determined by the global_database_id value and the partition size for the column.

Setting global_database_id to the default value indicates that GLOBAL DEFAULT AUTOINCREMENT is disabled. In this case NULL is generated as a default.

You can find the value of the option in the current database using the following statement:


This feature is of particular use in replication environments to ensure unique primary keys.

See also

The following example sets the database identification number to 100.

SET OPTION PUBLIC.global_database_id = '100';