Staging server limitations
Before using the staging server, you should be aware of the following limitations:
- IBM recommends to use the WebSphere Commerce Accelerator to make changes to your staging database. If you connect to the database directly, you can break some of the limitations required by staging. For example, if you change the category for a catalog entry through the Accelerator, first the old relationship will be deleted, and then a new relationship will be inserted. If you connect directly to the database, only an update is performed and the staging server will not find the ID of the record, as it will have changed.
You can modify your triggers to perform a delete and insert, however it is not recommended.
You cannot use the staging server with the buyer organization self-administration features.
- The MEMBER_ID column of all staging tables (excluding MEMBER, MBRREL, MBRROLE, and MBRATTRVAL) must be organizations or member groups, and not users. Users are indicated by a value of U in the type column of the MEMBER table. If the MEMBER_ID references a user in the MEMBER table, stagingcopy may fail. For example, the PARTICIPNT table has a foreign key to the MEMBER table. When creating a contract participant, the value in the MEMBER_ID column in the PARTICIPNT table cannot reference a MEMBER_ID in the MEMBER table that has a value of U in the type column. For more information see Troubleshoot: Staging server.
- For all site tables, the MEMBER_ID must be -2001 or 0. For all tables containing both site and merchant data, the MEMBER_ID for rows related to site data must be 0 or -2001.
- You cannot create or update RFQs on a staging server. If you use RFQs, they must be managed on the production server only.
- You cannot use the stagingcopy utility if you are using RFQ features on your production system. Before you launch your production site, create the staging server and set up production-ready data. Deploy and test your data on the staging server, then propagate to the production server using the stagingprop utility.
- You must manually propagate database schema changes from the staging to the production database. For example, if you create a new index or table in a production-ready data, manually create the index or table in the production database.
- Triggers are not created on all Commerce tables. In specific, the Product Advisor search space tables do not have triggers set up by default. You must configure these triggers manually. To see which tables have triggers, issue the following SQL command
select DISTINCT(TABNAME) from SYSCAT.TRIGGERS where TRIGNAME like 'STAG%' and TRIGSCHEMA='SCHEMA_NAME'
For more information about migrating Product Advisor data from a staging server to a production server refer to the related topic below.
To learn what WebSphere Commerce objects involve the MEMBER table, review the WebSphere Commerce data model documentation.
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 preceding key splitting SQL statements are already integrated with the instance configuration process. You do not need to run them manually.
Related concepts
Related tasks
Migrate Product Advisor data from staging server to production server