Space banner

 

This documentation supports the 20.02 version of BMC Digital Workplace Advanced.

To view the latest version, select the version from the Product Version menu.

Transferring data between environments



The Data Transfer tool, available with a BMC Digital Workplace installation is a set of multiple scripts that work in conjunction to export and import BMC Digital Workplace data between different BMC Digital Workplace environments, such as:

  • From a preproduction environment to a production environment
  • In a multitenant environment, between two tenants, so that both tenants have the same data

By using the tool, you can transfer all existing tenant-specific data from the business and system database schemas between source and target BMC Digital Workplace environments.

Scenario for using the BMC Digital Workplace Data Transfer tool

Allen, an administrator at Calbro Services, is deploying BMC Digital Workplace in his organization. In a preproduction environment, he configured the BMC Digital Workplace application according to the organization's needs. The validation testing is successful, and a Go-Live is approved. Allen now wants to configure BMC Digital Workplace in the production environment exactly like the preproduction environment. Instead of manually configuring the production environment or manually copying all data between environments, Allen uses the BMC Digital Workplace Data Transfer tool. With the tool, Allen seamlessly transfers all data to the production environment.

The following video (4:25) shows the process of exporting and importing data from a BMC Digital Workplace source tenant to a target tenant.

Note

The video shows an older version of BMC Digital Workplace. (The previous product name was MyIT.) Although there might be minor changes in the UI, the overall functionality remains the same.



 https://youtu.be/-ROfSFVKmqo

Before you begin

  • Ensure that you have permissions to access the databases on the source and target BMC Digital Workplace environments.
  • Locate the BMC Digital Workplace Data Transfer tool scripts in the DigitalWorkplace_Home\DWP\data-transfer\scripts directory, where DigitalWorkplace_Home is the BMC Digital Workplace installation directory. The default BMC Digital Workplace installation location is as follows:
    • (Windows) C:\Program Files\BMC Software\DWP\
    • (Linux) /opt/bmc/DWP/
  • If you are running the data transfer from a computer other than the BMC Digital Workplace host computer, copy the entire contents of the \data-transfer directory to your local computer.
  • Ensure that the Social and DWPApplication services are not being used during the data transfer.
  • Ensure that users do not create new data in the source database when the data export is in progress. Otherwise, the newly created data might not be included in the data export.


To transfer data between environments

The following graphic shows the sequential steps in the data transfer process.

Data transfer steps
For information about issues you might have during data transfer, and the corrective actions, see Troubleshooting data transfer issues.

Step 1: Export data from the source tenant database

  1. In the \scripts directory, locate the set_env.bat or set_env.sh script.

  2. Using a text editor such as Notepad, edit the set_env.bat or set_env.sh script, and enter the values for the variables.


    VariableDescription
    tenant_id

    Tenant ID of source BMC Digital Workplace tenant, from which you need to export data by using the utility.

    db_type

    Type of BMC Digital Workplace database: ORACLE or MSSQL.

    output_file_pathName of the output file created by the data export, in the following format: file_name.zip file. Optionally, you can provide a path for storing the file. If you do not provide a path, the exported file is stored in the \scripts directory.
    Note
    : The utility supports only .zip file format.
    db_connection_properties_fileName of the db_type.connection.properties file, depending on your database type. Here db_type is the database type you are using: mssql or oracle. The file names are as follows:
    • mssql.connection.properties
    • oracle.connection.properties
    export_type

    Comma-separated list of values to define the types of database tables that are transferred from the source to target database. The valid values are: location, calendar, service, help, unified_catalog, quick_pick, user_data, attachment, customization, configuration, i18n, system, other.

    For information about database tables associated to each export_type, see List of tables associated to export_type values.

    You can export the data in the following ways:

    • Export only selected data—Define the values in the export_type variable and run the run_export.bat or run_export.sh script to export selected data. 
    • Export all data—Do not define the values in the export_type variable. Run the data_dump.bat or data_dump.sh script. 

    The set_env.bat or set_env.sh scripts include a brief description of each variable.

  3. Save and close the set_env.bat or set_env.sh script.

  4. Edit the \dwp\data-transfer\connection\db_type.connection.properties file, and specify the required database information of the source database.


    For MS SQL database type:

    VariableDescription
    HostHost name of the MS SQL database server
    PortDatabase port
    business_db_name and system_db_nameNames of business and system databases
    business_user, business_password, system_user, and system_passwordUser names and passwords of business and system schema users

    For Oracle database type:

    VariableDescription
    HostHost name of the Oracle database server
    PortDatabase port
    business_service_name and system_service_nameNames of business and system services
    business_user, business_password, system_user, and system_passwordUser names and passwords of business and system schema users

     

  5. Save and close the db_type.connection.properties file.

  6. From the CLI console, navigate to the \scripts directory and run the appropriate command:

    • To export all data, run the data_dump.sh or data_dump.bat script.

    • To export only selected data, as specified in the export_type variable in the set_env.bat or set_env.sh script, run the run_export.bat or run_export.sh script.

    Note

    If you run the command again with the --overwrite option, it will overwrite the existing output file, or create a new output file if one is not already present.

    Depending on the file name you set in the output_file_path variable, an output file (file_name.zip) is created. The tool uses this file for importing the data in the target database. 

Step 2: Import the data to the target tenant database

Tips

For faster data import, run the data import step on the target database server.

  1. In the \scripts directory, locate the set_env.bat or set_env.sh script.

  2. Using a text editor such as Notepad, edit the set_env.bat or set_env.sh script, and enter the values for the variables.


    VariableDescription
    tenant_id

    Tenant ID of BMC Digital Workplace target tenant, to which you need to transfer data by using the utility.

    Note: In a multitenant environment, to transfer data to all tenants, use the same export file (file_name.zip) that contains the exported data. Change the tenant_id for each tenant, and import the data set to each tenant so that a consistent data set appears for all tenants.

    db_type

    Type of the BMC Digital Workplace target database: ORACLE or MSSQL.

    output_file_pathName of the output file created by the data export, in the following format: file_name.zip. Optionally, you can provide a path where the file is located. If you do not provide a path, the exported file is assumed to be in the /scripts directory.
    db_connection_properties_fileName of the db_type.connection.properties file, depending on your database type. Here db_type is the database type you are using: mssql or oracle. The file names are as follows:
    • mssql.connection.properties
    • oracle.connection.properties
    export_type

      

    Comma-separated list of values to define the types of database tables that are transferred from the source to target database. The valid values are: location, calendar, service, help, unified_catalog, quick_pick, user_data, attachment, customization, configuration, i18n, system, other.

    For information about database tables associated to each export_type, see List of tables associated to export_type values.

    You can import the data in the following ways:

    • Import only selected data—Define the values in the export_type variable and run the run_import.bat or run_import.sh script to import selected data. 
    • Import all data—Do not define the values in the in the export_type variable. Run the run_import.bat or run_import.sh script to import all data.

  3. Save and close the set_env.bat or set_env.sh script.

  4. Edit the \connection\db_type.connection.properties file, and specify the required database information of the target database.

    For MS SQL database type:

    VariableDescription
    HostHost name of the MS SQL database server
    PortDatabase port
    business_db_name and system_db_nameNames of business and system databases
    business_user, business_password, system_user, and system_passwordUser names and passwords of business and system schema users
    For Oracle database type:
    VariableDescription
    HostHost name of the Oracle database server
    PortDatabase port
    business_service_name and system_service_nameNames of business and system services
    business_user, business_password, system_user, and system_passwordUser names and passwords of business and system schema users

  5. Save and close the db_type.connection.properties file.

  6. From the CLI console, navigate to the \scripts directory and run the run_import.bat or run_import.sh command.
    The tool transfers the data to the target database.

Step 3: Verify the data transfer

  1. Run SQL queries to verify that the data in the migrated tables in the source and target databases match.
  2. Log in to the BMC Digital Workplace application on both source and target servers, and verify that all required data is available in the UI.

List of tables associated with export_type values

The export_type variable in the set_env.bat or set_env.sh script contains a comma-separated list of values that defines which database tables you transfer between the source and target databases. You can specify the value of this variable and then use the run_export.bat or run_export.sh script to transfer selected data between the source and target databases. The following table lists the valid values for the export_type variable and the database tables that correspond to each value:

Value of export_type variableCorresponding database tables
location
  • LOCATION_FLOOR_ASSET_ACTION
  • ASSET_ACTION_LOCALIZED_VALUES
  • LOCATION_FLOOR_ASSET_TYPE
  • ASSET_TYPE_LOCALIZED_VALUES
  • LOCATION_FLOOR_ASSET_TYPE
  • LOCATION_FLOOR_ASSET_ACTION
  • LOCATION
  • LOCATION_FLOOR_MAPS
  • LOCATION_FLOOR_MAP_ASSETS
calendar
  • TIMEZONES
  • APPOINTMENT_SCHEDULE
  • SCHEDULE_SLOT
service
  • SERVICE_AVAILABILITY
  • SERVICE_AVAILABILITY_ACTION
  • USER_SERVICE
help
  • HOW_TO                 
  • CONTACT_INFORMATION
  • CONTACT_INFO_LOCALIZED_VALUES
unified_catalog
  • UNIFIED_CATALOG_FAVORITE
  • UNIFIED_CATALOG_ITEM
  • UNIFIED_CATALOG_SECTION
quick_pick
  • QUICK_PICK 
user_data
  • USER_DETAILS
  • ADMINISTRATOR
  • CART
  • CART_ITEM
  • PREFERENCE
  • PREFERENCE_DETAILS
  • BROADCAST_NOTIFICATION
  • DEVICE_TOKEN
  • NOTIFICATION_PREFERENCES
external_user_data
  • USER_VALIDATION_TOKEN
  • USER_PASSWORD_HISTORY
  • USER_ACCOUNT_INFO
  • DOMAIN_RULE_PATTERN
attachment
  • ATTACHMENT
  • SOCIAL_ATTACHMENT
  • ATTACHMENT_FORMAT
customization
  • CUSTOMIZATION_APPLICATION
  • CUSTOMIZATION_ACTION
  • CUSTOMIZATION_ACTION_ORDER
  • CUSTOMIZATION_SCREEN
  • CUSTOMIZATION_AREA
  • CUSTOMIZATION_AREA_CELL
  • CUSTOMIZATION_MENU_DEPENDENCY
  • CUSTOMIZATION_GROUP
  • KNOWLEDGE_TEMPLATESTYLE
  • BRANDING_STATE
configuration
  • FEATURE_SETTINGS
  • USER_PREFERENCES
  • REQUIRED_FIELDS
  • CONFIGURATION_PARAMS
  • PAGE_LAYOUT_COMP_CONFIG
  • PAGE
i18n
  • AVAILABLE_LOCALES
  • MESSAGE_LOCALIZED_VALUES
  • REBRANDING_LOCALIZED_VALUES
  • LOCALIZATION
system
  • TENANT
  • PROVIDER
  • TENANT_PROVIDER
  • PROVIDER_SETTINGS
privacy
  • PRIVACY_NOTICE
  • PRIVACY_NOTICE_LOC_VALUES
  • PRIVACY_POLICY
  • PRIVACY_POLICY_LOC_VALUES
other
  • CLIENT_TYPE
  • CHECKIN
  • CATEGORY_INFO
  • SRD_INFO
  • PUSH_NOTIFICATION_CERT
  • SRD_SETTINGS
  • CHAT_ROOM_ASSIGNMENT
  • BRANDING_IMAGE
  • BRANDING_STYLESHEET

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Kiran Hullule

    how its different that performing db refresh from non prod to prod? wouldnt it work?

    Jul 15, 2020 07:33
    1. Olha Horbachuk

      Hi Kiran Hullule. Thanks for the question.

      It would be helpful if you gave more details on the use case because it is not clear what you mean by "db refresh".

      Regards,

      Olha Horbachuk

      Jul 28, 2020 09:02