Pointing your runtime instance to another database

Using changeExistingDB Ant target, you can update your instance to point to another database. This target is limited to runtime production environments only, and must not be run on non-production servers.

Before you begin

  • Log in as your non-root user.
  • Start your WebSphere Commerce server.
  • Start your search server.

About this task

Run the changeExistingDB Ant target on your version 8.0 environment to point that environment to your version 7.0, production database.

Procedure

  1. Go to the WC_installdir/bin directory.
  2. Run the following command:
    • Windowsconfig_ant.bat -buildfile WC_installdir\config\deployment\xml\changeExistingDB.xml -DinstanceName=instance_name -DNewDBAName=NewDBAName -DNewDBAPwd=DNewDBAPwd -DNewDBHost=DNewDBHost -DNewDBMSName=DNewDBMSName -DNewDBNode=NewDBNode -DNewDBServerPort=NewDBServerPort -DNewDBUserID=NewDBUserID -DNewDBUserPwd=NewDBUserPwd -DNewOraUserID=NewOraUserID -DNewOracleDataFile=NewOracleDataFile -DNewRemoteDB=NewRemoteDB -DNewServiceName=NewServiceName -DNewDbname=DNewDbname -DNewJDBCDriverLocation=NewJDBCDriverLocation
    • LinuxAIXconfig_ant.sh -buildfile WC_installdir\config\deployment\xml\changeExistingDB.xml -DinstanceName=instance_name -DNewDBAName=NewDBAName -DNewDBAPwd=DNewDBAPwd -DNewDBHost=DNewDBHost -DNewDBMSName DNewDBMSName -DNewDBNode=NewDBNode -DNewDBServerPort=NewDBServerPort -DNewDBUserID=NewDBUserID -DNewDBUserPwd=NewDBUserPwd -DNewOraUserID=NewOraUserID -DNewOracleDataFile=NewOracleDataFile -DNewRemoteDB=NewRemoteDB -DNewServiceName=NewServiceName -DNewDbname=DNewDbname -DNewJDBCDriverLocation=NewJDBCDriverLocation
    • For IBM i OS operating systemconfig_ant.sh -buildfile WC_installdir\config\deployment\xml\changeExistingDB.xml -DinstanceName=instance_name -DNewDBAName=NewDBAName -DNewDBAPwd=DNewDBAPwd -DNewDBHost=DNewDBHost -DNewDBMSName=DNewDBMSName -DNewDBNode=NewDBNode -DNewDBServerPort=NewDBServerPort -DNewDBUserID=NewDBUserID -DNewDBUserPwd=NewDBUserPwd -DNewOraUserID=NewOraUserID -DNewOracleDataFile=NewOracleDataFile -DNewRemoteDB=NewRemoteDB -DNewServiceName=NewServiceName -DNewDbname=DNewDbname -DNewJDBCDriverLocation=NewJDBCDriverLocation
    Where:
    instanceName
    The WebSphere Commerce instance name.
    NewDBAName
    The database administrator name of the version 7.0 database.
    NewDBAPwd
    The database administrator password of the version 7.0 database.
    Note: The password is encrypted while the utility runs. Use a decrypted password when you run this command.
    NewDBHost
    The host name of the version 7.0 database.
    NewDBMSName
    The type of database management system. Accepted values are Oracle or DB2.
    NewDBNode
    The database node of version 7.0 database.
    NewDBServerPort
    The server port of the version 7.0 database.
    NewDBUserID
    The database user ID on the version 7.0 database.
    NewDBUserPwd
    The database user ID password on the version 7.0 database.
    Note: The password is encrypted while the utility runs. Use a decrypted password when you run this command.
    NewOraUserID
    The Oracle database user of the version 7.0 database.
    Note: If you are using a DB2 database, pass this parameter with a blank value.
    NewOracleDataFile
    The full path to the Oracle data file.
    Note: If you are using a DB2 database, pass this parameter with a blank value.
    NewRemoteDB
    Specifies whether the version 7.0 database is remote. Accepted values are true or false.
    NewServiceName
    The Oracle service name for the version 7.0 database.
    Note: If you are using a DB2 database, pass this parameter with a blank value.
    DNewDbname
    The name of the version 7.0 database.
    NewJDBCDriverLocation
    The full path to the JDBC driver location.
    isProduction
    Specifies whether the database is production. Accepted values are true or false.

    If you are unsure about the command values, check the WC_installdir/instances/instance_name/xml/instance_name.xml file on your version 7.0 environment.

  3. When the command completes, check the changeExistingDB.log. The log file can be found in the WC_installdir/instances/instance_name/logs/ directory.