UpdateVersionSchema utility
The UpdateVersionSchema
utility identifies which tables to be
versioned, and then creates the tables in your version schema. This utility replicates newly added
tables marked to be versioned from the base schema into the version schema.
To determine which tables to create in the version schema, the
updateVersionSchema
utility searches all the service module directories for the
content version configuration file (wc-content-version.xml). For any tables
listed in the wc-content-version.xml file, the
updateVersionSchema
utility looks up the existing table in the HCL Commerce base schema, and then creates a corresponding table in the version schema. If the table listed in
the wc-content-version.xml file is not found, an exception is reported.
If workspaces is enabled, you must run this utility to update the workspace schemas.
Parameter values
- -DinstanceName
- Required: The name of the instance to be updated (for example, demo).
- -DdbUserPassword
- Required: The password for the HCL Commerce user that is connecting to the database.
- -DdbaPassword
- Required: The password for the database administrator that is connecting to the database.
- -DWCInstallDir
- The HCL Commerce installation directory (for example, WC_installdir).
- -Dwashome
- The WebSphere Application Server home directory (for example, WAS_installdir.
- -DgeneratSQLStatementOnly
- Optional: The default value is false. Setting this parameter to true generates an SQL log file, but does not run the SQL statements. The database administrator can use the SQL statements that are generated in the log file to update the version schema manually.
- -DdebugMode
- Optional: The default value is false. Setting this parameter to true generates a log file in WC_installdir/logs/Application.version.update.messages_timestamp.log. The timestamp is appended to the file name, for example, Application.version.update.messages_yyyy.mm.dd_hh.mm.ss.zzz.log.
- -DgenerateVersionSQLStatementsOutputFile
- Optional: Specify a path and name for the log file. If you do not specify this parameter, the default name WC_installdir/logs/Update_version_db_instance_name.sql.log is used.
Examples
./config_ant.sh -buildfile WC_installdir/migration/components/content-version/xml/updateVersionSchema.xml
-DinstanceName=instance_name -DdbUserPassword=db_password
-DWCInstallDir=WC_installdir -Dwashome=WAS_installdir
[-DgeneratSQLStatementOnly=generatesqlstatementonly] [-DdebugMode=debug_mode]
[-DgenerateVersionSQLStatementsOutputFile=logfile_pathname]
This following example shows how to use the updateVersionSchema
utility in the
runtime environment:
./config_ant.sh -buildfile /opt/WebSphere/CommerceServer90/migration/components/content-version/xml/updateVersionSchema.xml
-DinstanceName=demo -DdbUserPassword=wcs1 -DdbaPassword=manager -DWCInstallDir=/opt/WebSphere/CommerceServer90 -Dwashome=/opt/WebSphere/AppServer

-
updateVersionSchema.bat [-debug] [SQLlog_fullpathname]
- -debug
- Optional: Specify this parameter to generate the trace log file: WCDE_installdir\logs\Application.version.update.messages_timestamp.log. The timestamp is appended to the file name, for example, Application.version.update.messages_yyyy.mm.dd_hh.mm.ss.zzz.log.
- SQLlog_fullpathname
- Optional: When you specify the SQL log file name, the SQL statements are generated but not run. The database administrator can use the SQL statements that are generated in the log file to update the version schema manually.
updateVersionSchema
utility in
the development environment:
updateVersionSchema.bat -debug C:\WCToolkit\UpdateVersionSchema.sql.log
- WCDE_installdir\logs\Update_version_db_demo.sql.log (SQL file contains SQL statements to update the version schema)
- WCDE_installdir\logs\updateVersionSchema.log.
Limitations
- The
updateVersionSchema
utility replicates only the primary key, and unique indexes into the newly created table in the version schema, no other table definitions are created. For example, the table constraints are not replicated.