This documentation supports the 3.5 version of BMC Digital Workplace. 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 environements. Along with the BMC Digital Workplace data, the tool also transfers the BMC Remedy with Smart IT (Smart IT) data stored in the same database schemas.

Scenario for using the BMC Digital Workplace Data Transfer tool

Allen, an administrator at Calbro Services, is working on deploying BMC Digital Workplace in his organization. In a preproduction environment, he has 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 MyIT in the production environment exactly like the preproduction environment. Instead of manually configuring BMC Digital Workplace in the production environment or manually copying all data between environments, Allen chooses to use the BMC Digital Workplace Data Transfer tool to perform the task. By using the tool, Allen is able to seamlessly transfer all data to the production environment.

Note

The following 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.

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

 https://youtu.be/-ROfSFVKmqo

Before you begin

  • Ensure that you have permissions to access the databases on the source and target MyIT environments.
  • Locate the BMC Digital Workplace Data Transfer tool scripts in the MyIT_Home\SmartIT_MyIT\data-transfer\scripts directory, where MyIT_Home is the BMC Digital Workplace installation directory. The default BMC Digital Workplace installation location is as follows:
    • (Windows) C:\Program Files\BMC Software\Smart_IT_MyIT\
    • (Linux) /opt/bmc/Smart_IT_MyIT/
  • If you are running the data transfer from a computer other than the MyIT host computer, copy the entire contents of the \data-transfer directory to your local computer.
  • Ensure that the Social and MyITTomcat services are not being used during the data transfer.
  • Ensure that users do not create new data in the source database when 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. Click each link to go to the specific section.

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 the set_env.bat or set_env.sh scripts.

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

     Variables to be set in the set_env.bat or set_env.sh file


    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 as follows: 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 \SmartIT_MyIT\data-transfer\connection\db_type.connection.properties file and specify required database information of the source database.

     Database information to be specified in the db_type.connection.properties file


    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_passwordUsernames 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_passwordUsernames 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 not already present.

    Depending on the file name you set in the output_file_path variable, an output file, file_name.zip file 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 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 different variables.

     Variables to be set in the set_env.bat or set_env.sh file


    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 file that contains the exported data. Change the tenant_id for each tenant and import the data set to each tenant, so that 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 as follows: 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.

     Database information to be specified in the db_type.connection.properties file

    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_passwordUsernames 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_passwordUsernames 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. Login 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 define 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_ITEM
  • UNIFIED_CATALOG_SECTION
quick_pick
  • QUICK_PICK 
user_data
  • USER_DETAILS
  • ADMINISTRATOR
  • CART
  • CART_ITEM
  • PREFERENCE
  • PREFERENCE_DETAILS
  • BROADCAST_NOTIFICATION
  • DEVICE_TOKEN
attachment
  • ATTACHMENT
  • SOCIAL_ATTACHMENT
customization
  • CUSTOMIZATION_APPLICATION
  • CUSTOMIZATION_ACTION
  • CUSTOMIZATION_ACTION_ORDER
  • CUSTOMIZATION_SCREEN
  • CUSTOMIZATION_AREA
  • CUSTOMIZATION_AREA_CELL
  • CUSTOMIZATION_MENU_DEPENDENCY
  • CUSTOMIZATION_GROUP
  • KNOWLEDGE_TEMPLATESTYLE
configuration
  • FEATURE_SETTINGS
  • USER_PREFERENCES
  • REQUIRED_FIELDS
  • CONFIGURATION_PARAMS
i18n
  • AVAILABLE_LOCALES
  • MESSAGE_LOCALIZED_VALUES
  • REBRANDING_LOCALIZED_VALUES
system
  • TENANT
  • PROVIDER
  • TENANT_PROVIDER
  • PROVIDER_SETTINGS
other
  • CLIENT_TYPE
  • CHECKIN
  • CATEGORY_INFO
  • SRD_INFO
  • PUSH_NOTIFICATION_CERT
  • SRD_SETTINGS
  • CHAT_ROOM_ASSIGNMENT

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

Comments