Copying customer segments from the production environment to the staging environment

When marketing managers export a profile segment from , the resulting customer segment is stored in the production environment database. These customer segments must be copied to the staging environment database so that they are available to marketing managers when creating marketing activities and promotions in Management Center and Accelerator. provides a command-line utility that you can use to copy the customer segments from one server to the other.

About this task

Run the customer segment copy utility from the staging environment.

Procedure

  1. Open a command prompt window.
  2. Ensure that you run the customer segment copy utility as the wasuser user. To do so, issue the following command:
    su - wasuser_ID where wasuser_ID is the non-root user ID created before installing . The default WebSphere Application Server user name is wasuser.
  3. Run the customer segment copy utility with the following command:
    • utilities_root/bin/segmentcopy.sh -dbType databaseType -prodDb productionDatabase -prodDbUser productionDatabaseUser prodDbPasswd productionDatabasePassword -prodSchema productionSchema -stagDb stagingDatabase -stagDbUser stagingDatabaseUser -stagDbPasswd stagingDatabasePassword -stagSchema stagingSchema -fromDate fromDate
    -dbType
    • (Required) Specify DB2.
    -prodDb
    (Required) The name of the database on the production environment. Use the following format for the name:
    db_server:db_port/db_name
    -prodDbUser
    (Required) The database user name to connect to the production database.
    -prodDbPasswd
    (Required) The password for the specified -prodDbUser user name.
    -prodSchema
    The name of the schema for the production database. This parameter is required if your site uses a schema name that is different from the default schema name created for the production database. If you do not specify this parameter, the utility uses the default schema name for the production database, WCS. You can check the schema name by viewing the schemaName variable in the following file:
    utilities_root/instances/instanceName/properties/createInstance.properties
    -stagDb
    (Required) The name of the database in the staging environment. Use the following format for the name:
    db_server:db_port/db_name
    -stagDbUser
    (Required) The database user name to connect to the staging database.
    -stagDbPasswd
    (Required) The password for the specified -stagDbUser user name.
    -stagSchema
    The name of the schema for the staging database. This parameter is required if your site uses a schema name that is different from the default schema name created for the staging database. If you do not specify this parameter, the utility uses the default schema name for the staging database, WCS. You can check the schema name by viewing the schemaName variable in the following file:
    utilities_root/instances/instanceName/properties/createInstance.properties
    -fromDate
    (Required) Specifies the customer segments to copy, based on their created date or changed date, whichever is more recent. The utility copies all customer segments created or changed since the date, and optionally, the time you specify. Use either of the following formats for the -fromDate parameter:
    • mm/dd/yyyy
    • mm/dd/yyyy-HH.mm.ss
    For example, if today is July 1, 2011, and you want to copy all customer segments created or changed since yesterday at 1 PM, specify the following -fromDate value:
    06/30/2011-13.00.00
  4. Review the messages in the command prompt window to monitor the export. There is no log file for this utility.

Example

The following is an example of a command-line entry to run the utility:
segmentcopy -dbType DB2 -prodDb pserver:50000/WCS -prodDbUser wcsuser -prodDbPasswd wcsuser1 
-stagDb sserver:50000/WCS -stagDbUser wcsuser -stagDbPasswd wcsuser1 -fromDate 10/01/2010-09.00.00