Updating the database

Use the updatedb utility to update the WebSphere Commerce database to the latest maintenance level.

Before you begin

Ensure that you updated the installation directory with new maintenance package.

About this task

You need to update the database to the new maintenance level before you update an instance. If you do not update the database first, then your store cannot function properly. An instance cannot be at a higher level than the database.

If the updatedb utility fails, you can rerun the utility without the need to restore the database, hence avoiding downtime. The utility skips the SQL changes that were committed and continues from the point of failure.

Procedure

  1. Run the updatedb utility on the machine where WebSphere Commerce is installed.
  2. Optional: If the updatedb utility fails, review the updatedb log file:
    1. Review the following log file: WC_installdir\updatedb\updatedb-instance_name.log
      Tip: Refer to the FixPack_RunSQL targets in the log to see the schema scripts that are used to update the database. The following information can help you understand which DDL statements were executed, which statements were skipped, and which statements failed:
      [wccondsql]
      Indicates that the SQL statement is conditionally executed.
      execute-scope?
      Values: true or false.
      A string that indicates whether the particular DDL statement was executed (true) or skipped (false).
      checked-for:
      Values: absence or presence.
      Indicates whether to execute the particular DDL statements when a particular object is absent or when a particular object is present.
      If a DDL statement fails to execute, a Failed to execute message is displayed.
      For example,
      FixPack_RunSQL:
      [wccondsql] WCConditionalSQL version 8.0 fixpack 1 (20140407)
      [wccondsql] File: [C:\WEBSPH~1\COMMER~1\schema\db2\fixpack1\wcs.fixpack1.schema.sql] read successfully
      [wccondsql] Executing commands
      [wccondsql] Executing in schema: [WCS]
      [wccondsql] Scope [01] object: [column] name: [OVRMKTLIMIT] parent-table: [COLLATERAL] checked-for: [absence] execute-scope? [false]
      [wccondsql] 0 rows affected
      [wccondsql] Scope [02] object: [column] name: [DYNAMIC] parent-table: [CATGROUP] checked-for: [absence] execute-scope? [true]
      [wccondsql] Failed to execute: ALTER TABLE CATGROUP ADD COLUMN DYNAMIC INT DEFAULT 0
    2. Resolve any issues that are found in the log file.
    3. Rerun the updatedb utility.
      You do not have to restore the database. The utility skips over any previously executed DDL statements and resumes from the point of failure.
  3. When the update is complete, review the output that is displayed in the console window and ensure that you successfully updated the database to the correct maintenance level.
    For example, after you install a fix pack, you might see output that resembles the following message:
    UpdateSiteTable: [EchoNL] Updating database fixpack level ... 
    [eCDatabaseVersionInfo] UPDATE SITE SET EDITION='ENT', VERSION=8, RELEASE=0, MOD=0, FIXPACK=X WHERE COMPNAME='BASE'
    [eCDatabaseVersionInfo] SELECT COUNT(*) FROM SITE 
    [eCDatabaseVersionInfo] SELECT * FROM SITE 
    [eCDatabaseVersionInfo] Columns in SITE table: 
    [eCDatabaseVersionInfo] COMPNAME=BASE 
    [eCDatabaseVersionInfo] EDITION=ENT 
    [eCDatabaseVersionInfo] VERSION=8
    [eCDatabaseVersionInfo] RELEASE=0 
    [eCDatabaseVersionInfo] MOD=0 
    [eCDatabaseVersionInfo] FIXPACK=X 
    [eCDatabaseVersionInfo] Updated SITE table successfully. 
    [EchoNL] Completed database fixpack update. BUILD SUCCESSFUL 
    Where X is the number of the fix pack that was installed.

What to do next

If you do not have an existing WebSphere Commerce instance, then the installation is complete. Refer to Installing maintenance: Final steps.

LinuxAIXIf you plan to create an instance and you recently upgraded your WebSphere Application Server fix pack level, complete the following steps before you create the WebSphere Commerce instance:
  • Sign in as the root user.
  • Run the command: WC_installdir/bin/wcnonroot.sh