Changing database settings on an existing WebSphere Commerce instance

If you want to change database settings, such as the database host name or the port number, on an existing WebSphere Commerce instance, you must manually complete the changes.

Note: If you need to change database user and administrator passwords, you can update the WebSphere Commerce configuration file and properties within the WebSphere Application Server administrative console. For more information, see Changing database passwords.

Procedure

  1. Change the values that correspond to the database settings that you changed.
    Edit the following file in a text editor to ensure that the values match your database settings:
    • SolarisLinuxAIXWindowsWC_installdir/instances/instance_name/properties/createInstance.properties
    • For IBM i OS operating systemWC_userdir/instances/instance_name/properties/createInstance.properties
  2. Change the values that correspond to the database settings that you changed.
    Edit the following file in a text editor to ensure that the values match your database settings:
    • SolarisLinuxAIXWindowsWC_installdir/instances/instance_name/xml/instance_name.xml
    • For IBM i OS operating systemWC_userdir/instances/instance_name/xml/instance_name.xml
  3. Ensure that your WebSphere Commerce instance is running and within a command-line utility, go to the WC_installdir/bin directory. Run the following script to propagate the change to wc-server.xml:
    • Windowsconfig_ant -DinstanceName=instance_name UpdateEAR
    • SolarisLinuxAIX./config_ant.sh -DinstanceName=instance_name UpdateEAR
  4. Update the JDBC data sources in the WebSphere Application Server administration console. Ensure that you have updated the sources on both the WebSphere Commerce server and the Solr server if Solr is running on a separate node.
    1. Log on to the WebSphere Application Server administration console.
    2. Expand Resources > JDBC. Click Datasources
    3. For each of the following data sources for your instance, update the values for any of the database settings that you want to change.
      • jdbc/WebSphere Commerce DataSource
      • jdbc/WebSphere Commerce Publish DataSource
      Ensure that you change the User ID and Password preferences for the data sources. To change the ID and Password, click JAAS J2C authentication data in the Related items section of the data source configuration tab. In the list of data sources, select the data source that you want to update. In the list of General Properties, change the ID and Password and then click Apply > Save directly to the master configuration.
    4. Save the changes
  5. If you are running WebSphere Commerce Version 6 or earlier, the data source information will not be automatically updated in the wc-data-config.xml configuration file. Edit the wc-data-config.xml file and manually update the url parameter of the dataSource element to point to the new source.
  6. Restart the WebSphere Commerce Server.