Create a primary key pool table.
There are no prerequisites for this task.
On the consolidated database, execute the following statement to create a primary key pool table:
CREATE TABLE KeyPool ( table_name VARCHAR(128) NOT NULL, value INTEGER NOT NULL, location CHAR(12) NOT NULL, PRIMARY KEY (table_name, value), );
|table_name||Holds the names of tables for which primary key pools must be maintained. For example, if new sales representatives are added only on the consolidated database, only the Customers table needs a primary key pool and this column is redundant.|
|value||Holds a list of primary key values. Each value is unique for each table listed in table_name.|
|location||An identifier for the recipient. In some systems, this can be the same as the rep_key value of the SalesReps table. In other systems, there are users other than sales representatives; in such systems, the two identifiers should be distinct.|
To increase performance, execute the following statement to create an index on the primary key table:
CREATE INDEX KeyPoolLocation ON KeyPool (table_name, location, value);
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|