Updated on 2024-03-08 GMT+08:00

Object Correction

The modified statements will run on the target database. Do not use statements that cause the drop of other tables and object types, or statements that cause malicious activities such as consuming too much CPU, memory and other side effects over target database.

Constraints

If you select Oracle as the source database type, DB_LINK objects can only be converted and cannot be migrated, and their migration status is Ignore by default.

Procedure

  1. Log in to the UGO console.
  2. In the navigation pane on the left, choose Schema Migration > Object Migration. The migration project list is displayed.
  3. Locate the project to be migrated and click Migrate in the Operation column. On the displayed page, click the Object Correction tab.

    Figure 1 Object correction
    • You can view the schema name, object type, object name, conversion status, and migration status on the page.
    • You can filter objects by object type, schema, conversion status, migration status, object name, SQL content included, SQL content excluded, conversion errors include, or migration errors include. If you select Object Name, fuzzy search is supported. If you select SQL Content Includes or SQL Content Excludes, you can enter up to three keywords and each keyword contains up to 10 characters. If there are a large number of objects in a project, the query slows.
    • If you search for the desired object by schema, the schema name cannot contain whitespace characters.

  4. Locate an object you want to modify and click View Details in the Operation column.

    Correct management, storage, code, and job objects in sequence.

  5. View the conversion or migration error information. If any, modification suggestions are displayed.

    • Locate an object whose Conversion Status is Failed, click View Details in the Operation column to view conversion errors.
    • Locate an object whose Migration Status is Failed, click View Details in the Operation column to view migration errors.

      If the target database is GaussDB, database object names must meet start with a letter or underscore (_) and can contain letters, digits, underscores (_), dollar signs ($), and number signs (#). The length of a non-time series table cannot exceed 63 bytes, and the length of a time series table cannot exceed 53 characters.

    Figure 2 Migration errors in the object details page

  6. Modify SQL statements.

    • Export: Click Export SQL to export the SQL file of the target database. Exported file name: Object name.sql.
    • Import: Click Import SQL to directly import the modified SQL file. After the SQL file is uploaded, all changes are automatically saved.
    • Compare: This function is disabled by default. If this function is enabled, the detailed code comparison between the source and target databases is displayed. In this case, the SQL statements cannot be edited.
    • Copy: Click next to Source or Target to copy the SQL statements to the clipboard.
    • Full screen: You can click next to the target end to enter the full-screen editing mode. To exit the full-screen editing, click or click the edit box and press Esc.
    • Update dependency data: If this function is enabled, all dependent objects are also verified. This function is enabled by default and can be disabled. It is available only after the object migration is verified.
    • Reset: Before saving the modified code, you can click Reset to clear all modifications. If the modification has been saved, you can only perform a rollback operation.
    • Save: Click Save to save the modifications for target database code. The modification records will be generated and saved in the history.

  7. After the modification, click Save. The modification record is saved in the Modification History area in the current page.

    In the Modification History area, locate the history record and click Rollback in the Operation column to roll back to the latest modification record.

  8. Click the drop-down icon next to History ID to compare the code before and after modification.

    Figure 3 Modification history

  • After the modification, the conversion status of the object changes from to Manual.
  • For details about batch object modification, see Updating Statements in Batches.