Staging server limitations

Before using the staging server, you should be aware of the following limitations:

Key splitting

In the reseller marketplace, IBM and the Site Administrator update data on the staging server, while resellers update data on the production server. This potentially causes a primary key collision.

WebSphere Commerce uses a key manager to generate primary keys for tables, and the key range is defined in the KEYS table. If the production server and staging server use the same key range, the key manager can allocate the same primary key value for the same table, on both the production and staging server, causing primary key collision. As a result, the key range must be split immediately after the staging instance and production instance are created. This ensures that the staging server and production server will use different key ranges.

Currently, WebSphere Commerce uses the following SQL statements to split the key range on the staging and production servers. The SQL statements split the current key range into three equal portions.

Portion one

update keys set upperbound=(upperbound-lowerbound)/3 + lowerbound
where tablename in (select tabname from stgmertab) or tablename
 in (select tabname from stgsitetab)

Portion two

db2 update keys set upperbound = (upperbound-lowerbound)/3*2 + lowerbound, 
lowerbound = (upperbound-lowerbound)/3 +lowerbound+1, counter = 
counter+(upperbound-lowerbound)/3 +1 where tablename in
 (select tabname from stgmertab)
 or tablename in (select tabname from stgsitetab)

Portion three

db2 update keys set lowerbound = (upperbound-lowerbound)/3*2 + lowerbound +1
, counter = counter +(upperbound-lowerbound)/3*2 +1 where tablename in
(select tabname from stgmertab) or tablename in (select tabname from stgsitetab)

The first SQL statement, portion one, must be run on the production server. This ensures that the production server will occupy one third of the full key range. The second SQL statement, portion two, must be run on the staging server. This means that the staging server will occupy the second one third of the full key range. The third SQL statement, portion three, can be kept for a second potential staging server in the future.

The above key splitting SQL statements are already integrated with the instance configuration process. You do not need to run them manually.

Feedback