This blog promotes knowledge sharing through experience and collaboration. For more product information, visit our WebSphere Commerce CSE page. For easier navigation, utilize the Categories to find posts that match your interest.
Stagingprop Table Lists - Sample Lists for Espots and Promotions
Out of the box, stagingprop will propagate changes from a staging environment to a production environment using the following predefined scopes.
The list of tables that are to be propagated for site related data, comes from the table STGSITETAB. For merchant related data, the table STGMERTAB. If all data is to be propagated, it pulls the the information from the tables STGSITETAB, STGMRSTTAB, STGMERTAB, and STGMRSTTAB (in this order).
If we want to filter down the scope, we can use our own table list to only propagate selected tables.
You can specify a custom list of tables with the -scope and -configfile parameters. The file specified by the -configfile parameter contains a list or multiple lists of database tables while the -scope parameter specifies which list or lists in the file to use.
Here is an example of the stagingprop command:
./stagingprop.sh -scope myTableList -sourcedb stgdb -sourcedb_user db2inst1 -sourcedb_passwd pwd01 -destdb prddb -destdb_user db2inst1 -destdb_passwd pwd01 -configfile /opt/IBM/WebSphere/CommerceServer70/Stagingprop/tableLists.xml
Where myTableList is a customized list of tables to be propagated. This list is configured in the configuration file /opt/IBM/WebSphere/CommerceServer70/Stagingprop/tableLists.xml.
The configfile that lists the tables to be propagated is an xml file that uses the following format.
list_name is the name of the list of tables that will be used with the -scope parameter. In example we used myTableList.
table1, table2, and tableX are the database table names that we want to propagate.
You can add more lists to the configfile by adding <TableList> tag within the <StagingConfig> tag.
Once you're done, save the file and make a note of the full path as it will be required when using the -configfile parameter (e.g. -configfile /opt/IBM/WebSphere/CommerceServer70/Stagingprop/tableLists.xml).
Table List Order
When adding tables to the <TableList> is it crucial to have them in the correct order. For instance, if you wanted to create a list containing the following tables:
You'd need to query the STGMERTAB table for the TABNBR and TABNAME columns. TABNBR will indicate the ordering number. The higher the number, the later it has to be executed. For this example, we run the following query.
Based on the TABNBR values, the correct order is as follows.
Sample List to Propagate Espots
Note: during execution you can specify multiple list using the slash character ("/"). For example, you use -scope espot_content / espots / espot_activity.
Sample List to Propagate Promotions