Controls the range of values for columns created with DEFAULT GLOBAL AUTOINCREMENT. For use in generating unique primary keys in a replication environment.
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 database 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 DEFAULT GLOBAL 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:
SELECT DB_PROPERTY( 'GlobalDBID' );
This feature is of particular use in replication environments to ensure unique primary keys.
The following example sets the database identification number to 100.
SET OPTION PUBLIC.global_database_id = '100';
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|