This section describes the configuration steps you must take before Performing a Database Copy of your product catalog and price lists data. You must complete this process before performing an initial database copy. However, you don’t need to complete this process before subsequent database copies as long as the source and destination databases remain the same.

Note: While the process used in this section assumes the data is in a SOLID database, the mechanisms are the same regardless of what kind of database is used. The differences are in the configuration of the environment within which ATG Commerce is running. Some database clients require additional configuration to perform the database copy. Refer to the database client’s documentation for more information.

Follow these configuration steps to prepare to copy the product catalog and price lists data from one database to another:

  1. Create the destination database and all destination tables.

    Most interactions between the ATG Commerce and a database are done through JDBC, but the DBCopier in this process instead uses native commands according to the database manufacturer. It executes a new process and uses the vendor’s bulk copy tools to copy the tables from one database to another. This means that the DBCopier and, therefore, the JVM running Dynamo must have the proper environment set up as specified by the vendor. See your vendor documentation for these specifications. For information on the API for the specific DBCopier you are using, you can refer to the ATG API Reference.

    The following are some SOLID-specific configuration settings:

    • $SOLIDDIR should be defined in the environment in which Dynamo is running.

    • The names of the servers to use when performing the database copy should be defined in the solid.ini file.

      [Data Sources]
      SOLID=TCP/IP localhost 1313,SOLID

      Note that “SOLID” is a valid server name.

  2. Verify that the environment is set up correctly. Make sure that all the necessary environmental variables are set as specified by the vendor. Verify that all the necessary drivers or client tools are installed.

  3. Create a DBCopier component with which to copy the product catalog and price lists data. The class from which you instantiate the DBCopier depends on the database you are using. The following are subclasses of atg.adapter.gsa.DBCopier and are in package atg.adapter.gsa:

    • BcpDBCopier (for Microsoft and Sybase)

    • DB2DBCopier

    • OracleDBCopier

    • SolidDBCopier

    For more information on these DBCopier classes, you can refer to the ATG API Reference and the ATG Installation and Configuration Guide.

    Alternatively, you can use one of the preconfigured DBCopier components that are included with ATG Commerce. They are:

    • ProductCatalogMsSqlDBCopier

      Note: By default, the ProductCatalogMsSqlDBCopier.maxTextOrImageSize property is set to a negative value (-1) in order to force the copier not to use the –T option with the bcp utility; the –T option does not work with MS SQL. For more information on the maxTextOrImageSize property, refer to the BcpDBCopier class (from which ProductCatalogMsSqlDBCopier is instantiated) in the ATG API Reference. For more information on the bcp utility, refer to your database vendor documentation.

    • ProductCatalogOracleDBCopier

    • ProductCatalogDB2DBCopier

    • ProductCatalogSybaseDBCopier

    • ProductCatalogSolidDBCopier

    These DBCopier components are located in Nucleus at /atg/commerce/jdbc/.

    The following code example is taken from the properties file of ProductCatalogSolidDBCopier:

    # This is an instance of the DBCopier specific for copying
    # ProductCatalog data from one Solid instance to another.

    $class=atg.adapter.gsa.SolidDBCopier

    #
    # The directory where temporary files are stored.
    #
    directory=d:/copytmp

    #
    # The name of the file that gets created to delete
    # data from the destination.
    #
    deleteDataFileName=del_dest_data.sql

    #
    # The list of tables that will actually be copied.
    # If there are references between tables, make sure they
    # appear in the correct order. The tables are updated in the
    # order they appear in this list.
    #
    # Copy will overwrite these tables. Only list static tables
    # that do not change.
    #
    # There are 3 sets of tables listed here: product catalog, promotions,
    # and price lists.
    #
    # These are the product catalog tables:
    #
    #     dcs_folder
    #      dcs_media
    #      dcs_media_ext
    #      dcs_media_bin
    #      dcs_media_txt
    #      dcs_category
    #      dcs_category_acl
    #      dcs_product
    #      dcs_product_acl
    #      dcs_sku
    #      dcs_cat_groups
    #      dcs_cat_chldprd
    #      dcs_cat_chldcat
    #      dcs_cat_ancestors
    #      dcs_cat_rltdcat
    #      dcs_cat_keywrds
    #      dcs_cat_media
    #      dcs_cat_aux_media
    #      dcs_prd_keywrds
    #      dcs_prd_media
    #      dcs_prd_aux_media
    #      dcs_prd_chldsku
    #      dcs_prd_skuattr
    #      dcs_prd_groups
    #      dcs_prd_rltdprd
    #      dcs_prd_ancestors
    #      dcs_sku_attr
    #      dcs_sku_link
    #      dcs_sku_bndllnk
    #      dcs_sku_media
    #      dcs_sku_aux_media
    #      dcs_sku_replace
    #      dcs_sku_conf
    #      dcs_config_prop
    #      dcs_conf_options
    #      dcs_config_opt
    #      dcs_foreign_cat
    #
    # These are the promotion tables:
    #
    #      dcs_promotion
    #      dcs_promo_media
    #      dcs_discount_promo
    #
    # These are the price list tables:
    #
    #      dcs_price_list
    #      dcs_complex_price
    #      dcs_price
    #      dcs_price_levels
    #      dcs_price_level
    #      dcs_gen_fol_pl
    #      dcs_child_fol_pl
    #      dcs_plfol_chld
    #
    # If you are using custom catalogs, you should also add these files:
    #
    #      dcs_catalog
    #      dcs_root_cats
    #      dcs_allroot_cats
    #      dcs_root_subcats
    #      dcs_sub_catalogs
    #      dcs_category_info
    #      dcs_product_info
    #      dcs_sku_info
    #      dcs_cat_subcats
    #      dcs_cat_subroots
    #      dcs_cat_catinfo
    #      dcs_catinfo_anc
    #      dcs_prd_prdinfo
    #      dcs_prdinfo_rdprd
    #      dcs_prdinfo_anc
    #      dcs_sku_skuinfo
    #      dcs_skuinfo_rplc
    #      dcs_gen_fol_cat
    #      dcs_child_fol_cat
    #      dcs_catfol_chld
    #
    #
    tables= \
          dcs_folder,\
          dcs_media,\
          dcs_media_ext,\
          dcs_media_bin,\
          dcs_media_txt,\
          dcs_category,\
          dcs_category_acl,\
          dcs_product,\
          dcs_product_acl,\
          dcs_sku,\
          dcs_cat_groups,\
          dcs_cat_chldprd,\
          dcs_cat_chldcat,\
          dcs_cat_ancestors,\
          dcs_cat_rltdcat,\
          dcs_cat_keywrds,\
          dcs_cat_media,\
          dcs_cat_aux_media,\
          dcs_prd_keywrds,\
          dcs_prd_media,\
          dcs_prd_aux_media,\
          dcs_prd_chldsku,\
          dcs_prd_skuattr,\
          dcs_prd_groups,\
          dcs_prd_rltdprd,\
          dcs_prd_ancestors,\
          dcs_sku_attr,\
          dcs_sku_link,\
          dcs_sku_bndllnk,\
          dcs_sku_media,\
          dcs_sku_aux_media,\
          dcs_sku_replace,\
          dcs_sku_conf,\
          dcs_config_prop,\
          dcs_conf_options,\
          dcs_config_opt,\
          dcs_foreign_cat,\
          dcs_promotion,\
          dcs_promo_media,\
          dcs_discount_promo,\
          dcs_price_list,\
          dcs_complex_price,\
          dcs_price,\
          dcs_price_levels,\
          dcs_price_level,\
          dcs_gen_fol_pl,\
          dcs_child_fol_pl,\
          dcs_plfol_chld

    Note: If you are running Pioneer Cycling, note that the ProductCatalogOracleDBCopier and ProductCatalogSolidDBCopier components specify additional tables because Pioneer Cycling uses additional tables for its product catalog. If you want to use a different database for the database copy, and therefore a different DBCopier, you’ll need to manually add these tables to the DBCopier.

  4. Check that the directory specified in the directory property of the DBCopier exists in the file system used by Dynamo.

  5. Verify that the tables property of the DBCopier component includes all the necessary tables to copy in the correct order. The tables in the destination database will be updated according to the list of tables in this property.

  6. Optionally, to obtain information on the activity of the DBCopier, you can set the loggingDebug property of the DBCopier component to true.

  7. Create an instance of atg.droplet.sql.DBCopyFormHandler to handle the database copy. Alternatively, you can use the preconfigured DBCopyFormHandler included with ATG Commerce. It is located in Nucleus at /atg/commerce/jdbc/ProductCatalogCopierForm.

    The following code example is taken from the properties file of ProductCatalogCopierForm:

    #
    # This is an instance of the DBCopyFormHandler that is specific
    # to copying product catalog and price lists data.
    #
    $class=atg.adapter.gsa.DBCopyFormHandler
    $scope=request
    #
    # This is the DBCopier to use. The class used depends on the
    # brand of database being used.
    #
    DBCopier=/atg/commerce/jdbc/ProductCatalogSolidDBCopier

  8. Perform the database copy from the Copy Product Catalog and Price Lists page, as described in Performing a Database Copy.

 
loading table of contents...