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

SQL Anywhere 11.0.0 » SQL Remote » Replication Design for SQL Remote » SQL Remote installation design » Ensuring unique primary keys » Using global autoincrement default column values


Setting the global_database_id value

When deploying an application, you must assign a different identification number to each database. You can accomplish the task of creating and distributing the identification numbers by a variety of means. One method is to place the values in a table and download the correct row to each database based on some other unique property, such as user name.

To set the global database identification number

  • You set the identification number of a database by setting the value of the public option global_database_id. The identification number must be a non-negative integer.

For example, the following statement sets the database identification number to 20.

SET OPTION PUBLIC.global_database_id = 20;

If the partition size for a particular column is 5000, default values for this database are selected from the range 100001-105000.