Contents Index FOR_XML_NULL_TREATMENT option [database] INPUT_FORMAT option [ISQL]

ASA Database Administration Guide
  Database Options
    Alphabetical list of options

GLOBAL_DATABASE_ID option [database]


Function 

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

Allowed values 

Integer

Default 

2147483647

Scope 

PUBLIC setting only.

See also 

CREATE TABLE statement

Database-level properties

Ensuring unique primary keys

Description 

If you create a column with DEFAULT GLOBAL AUTOINCREMENT, its value is incremented. The initial value is determined by the GLOBAL_DATABASE_ID value and the partition size. For more information on the partition size, see CREATE TABLE statement.

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:

select db_property( 'GlobalDBId' )

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

For more information, see Ensuring unique primary keys and Maintaining unique primary keys using global autoincrement.


Contents Index FOR_XML_NULL_TREATMENT option [database] INPUT_FORMAT option [ISQL]