Use the MMG Schema Sync Utility

Before you use the MMG Schema Sync Utility, the following prerequisites must be met:
  • You must have shell access to the OFS MMG server.
  • You require the following information:
    • Workspace name: The workspace that contains the source and target schemas. Example: WS123
    • Login user name: The MMG user who runs the utility. Example: mmgadmin
    • Locale: The locale for utility execution. Example: en_US
    • V_SERVICE_ID: The V_SERVICE_ID value from the tenant_connection_info table for the DATA connection type of the target schema. This is the wallet alias that corresponds to the target schema and can be found in the tenant_connection_info table.
    • Optional, a space-separated list of tables in the required format for synchronizing specific tables.

Synchronize Tables with the MMG Schema Sync Utility

Use the following commands to synchronize the database schema meta data between a work space’s source and target environments in any of the following scenarios:
  • After manually creating or altering tables in the target schema outside OFS MMG.
  • Whenever you observe errors related to missing or duplicate objects while editing the workspace or data sourcing in OFS MMG.
  • As part of a scheduled reconciliation or maintenance process in environments with frequent manual DBA operations.
  1. To synchronize specific tables, run the following code:
    ./sync_source_target_schema_utility.sh WORKSPACE_NAME LOGIN_USER LOCALE V_SERVICE_ID -t \"TABLE1 TABLE2"

    Note:

    Specify the V_SERVICE_ID value from the tenant_connection_info table. Do not specify the target schema name or datastore name.

    Or

    To synchronize all tables, run the following code:

    ./sync_source_target_schema_utility.sh MYWORKSPACE mmgadmin en_US MY_SERVICE_ID

    Valid examples:
    • Sync all tables: ./sync_source_target_schema_utility.sh UTILWR1 mmgadmin en_US utl_als
    • Sync one table: ./sync_source_target_schema_utility.sh UTILWR1 mmgadmin en_US utl_als -t "DIM_CUSTOMER"
    • Sync multiple tables: ./sync_source_target_schema_utility.sh UTILWR1 mmgadmin en_US utl_als -t "STG_SALES_ORDER_C2 STG_SALES_ORDER_C3 STG_SALES_ORDER_C4"
    The following -t formats are invalid:
    • -t "\"TABLE1\""
    • -t ""
    • -t "
    • TABLE1"

    Malformed values specified for the -t option are rejected during input validation, and the utility displays an appropriate validation message before processing the synchronization request.

    Although the current implementation may accept a single unquoted table name after the -t option, Oracle recommends specifying table names in double quotation marks for consistency.

  2. After you accept the request, the utility returns a status: received message, to indicate that the synchronization request has been accepted. This status indicates only that the request has been received and does not confirm successful completion of the synchronization.

    Review the backend logs to verify that the synchronization completed successfully.

    After successful synchronization, the synchronized tables become available for MMG workspace operations.

  3. Check the log file that can be found in mmg-service.logs for further details such as ensuring that the synchronization has completed and to diagnose errors.
  4. After running the utility, you will be able to add the newly synchronized tables in OFS MMG through the UI as part of data sourcing or workspace editing.

    Note:

    Validation of the -t option is performed before the synchronization request is submitted. Errors such as an invalid table list format are reported immediately. Environment-specific or business validation failures, such as an invalid workspace name or V_SERVICE_ID, are detected during backend processing and require backend log inspection.

Limitations and Best Practices

  • The utility does not validate your parameters, workspace, service ID, etc.. Incorrect entries will not cause visible errors in the command line, but it will result in sync failure, hence it is recommended to view the log file in mmg-service.logs.
  • For best results, double-check all the inputs and consult your system administrator for the correct V_SERVICE_ID.
  • Large schema or multiple tables may take time to synchronize.

Troubleshooting

  • If your synchronization status displays the status: received message but your changes don’t appear in OFS MMG, you must check the log file in mmg-service.logs for details.
  • Verify that the provided V_SERVICE_ID matches your intended target schema connection.
  • When in doubt, consult the technical team or system administrator for reviewing the log file or further troubleshooting actions.