Database Migration and Verification
Scenarios
After the migration project is created, you need to start the migration project, select objects to be migrated, and configure the conversion solution based on the migration risk items. After the syntax conversion is started, UGO converts the SQL syntax of the source database to the syntax compatible with the target database. The syntax that fails to be converted can be manually corrected. After the modification is complete, migrate objects to the target database. You can view the migration progress and details to verify the migration result.
You can perform the following steps to migrate a database and verify the migration result:
Selecting Objects To Be Migrated
- Log in to the UGO console.
- In the navigation pane, choose .
- On the Object Migration page, locate the project that you want to migrate and click Migrate in the Operation column.
On the conversion plan page, the objects to be converted and their categories are displayed. You can search for objects by date or object name, or filter objects by schema, object status, or conversion status. For details, see Viewing the Collection Result of a Source Database.Figure 1 Configuring a conversion plan
- Select objects to be converted on the GUI.
- All objects to be converted by default are displayed in the navigation pane. You can click Select Migration Object Types and quickly set Conversion Status of objects that are not migrated to Skip.
- Click the check boxes next to the Schema column to select objects. Click Skip Conversion or Convert to determine whether to migrate the objects in batches. You can filter objects by name or status.
- Upload a specified object locally.
Click Convert Specified Objects, download the template, enter the objects to be converted in an Excel file, and upload the Excel file. For details, see Uploading Objects.
- Select objects to be converted on the GUI.
- (Optional) Set the GaussDB database data distribution mode.
- This function is supported when the source database type is an Oracle or MySQL and the target database type is GaussDB Distributed.
- You can set the data distribution mode for table objects. For details, see Distribution Mapping of Table Objects.
- If the object to be converted contains a user, you need to set a unified user password. Click User Password in the upper left corner. In the displayed dialog box, set the password.
Figure 2 Configuring USER password
- If you want to convert the user object, you must set a password. The same password will be used for all USER object creation on the target database. After the migration, the individual user passwords must be changed manually. If you do not want to convert the object type USER, select the desired USER objects and click Skip Conversion. Then, the Conversion Status of the objects becomes Skip. To continue the conversion, select the desired objects and click Convert.
If you ignore user migration, a message is displayed. You need to set Current Configuration to Allow the object owner to execute scripts on the GaussDB database. for item User connection in Setting Conversion Configuration Items. Otherwise, the migration may fail.
- You are advised to use SSL connection. If non-SSL connection is used, the password will be transmitted as plain text as part of the database connection and any SQL statements involving a password will be insecure.
- After the password is configured, it cannot be changed again until after the migration is complete.
- The password can consist of 8 to 32 characters and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^&*()-_=+\|[{}];:,<.>/?). Spaces are not allowed. The password can contain up to three consecutive characters.
- If you want to convert the user object, you must set a password. The same password will be used for all USER object creation on the target database. After the migration, the individual user passwords must be changed manually. If you do not want to convert the object type USER, select the desired USER objects and click Skip Conversion. Then, the Conversion Status of the objects becomes Skip. To continue the conversion, select the desired objects and click Convert.
Setting Conversion Configuration Items
- Click Next. The Conversion Config tab page is displayed.
- Set conversion configuration items using either of the following methods:
- By default, the default template is used. Click Edit in the Operation column of each conversion configuration item and set them based on the site requirements.
- If the maximum migration success rate is preferred, you can select Max compatibility from the Baseline Template drop-down list and fine-tune the template.
Figure 3 Setting conversion configuration items
- (Optional) Click the Tablespace Mapping tab.
To map tablespaces, select required tablespaces of the source and target databases and click Tablespace Mapping.
The following migration flows support the tablespace mapping function.
- From Oracle to GaussDB
- From Oracle to PostgreSQL
Starting Syntax Conversion
- Click Next.
- Click Start to start the conversion.
Figure 4 Syntax conversion
- After the conversion is complete, the following information is displayed: object type, the number of total objects, the number of objects converted successfully, the number of objects that failed to be converted, conversion start time, and conversion end time.
- The migration progress is displayed in a progress bar and as a percentage.
If you click Start, the syntax will be converted again and all converted data, including manually modified objects, will be overwritten. Exercise caution when performing this operation. To start the conversion, click Start and in the displayed dialog box, click OK.
- After the syntax conversion is complete, you can view the syntax conversion history and details. For details, see Viewing the Syntax Conversion History.
- If the syntax conversion is complete, you need to modify the conversion plan. For details, see Setting Conversion Configuration Items.
- If syntax conversion fails, you need to manually modify the objects. For details, see Correcting Objects That Failed to Be Converted.
Correcting Objects That Failed to Be Converted
- Click Next to go to the Object Correction page.
Figure 5 Object correction
- Locate objects and click Skip Migration to ignore the objects that you do not want to verify.
- Batch update: You can click Bulk Statement Update to search for and modify objects with the similar issues in batches. For details, see Updating Statements in Batches.
- Locate an object and click View Details in the Operation column. You can view conversion error and modification suggestions.
Figure 6 Conversion errors on the object details page
- You are advised to correct objects in the sequence of management, storage, code, and job objects.
- When you return to the object correction page and view details about the objects that failed to be migrated, migration errors are displayed.
- Modify the SQL statements of the objects that failed to be converted or migrated. Click Save. The modification record is generated,
- Click Modification History to view the modification history. Click the drop-down icon next to a historical ID to display the comparison result of SQL statements before and after the modification.
- Click Rollback to roll back the SQL statements to the status before the modification.
Figure 7 Modification history
Verifying the Object Migration Result
- Click Next. The Migration tab page is displayed by default.
Figure 8 Migration
- Click Migration Verification to set the migration process.
- The detailed information about the migration project is displayed, including object types, total objects, objects that have been migrated, objects that failed to be migrated, and objects that have not been migrated. If objects that failed to be converted will not be migrated, Objects Not Migrated upon Conversion Failure is also displayed.
- Click Details in the Operation column to go to the Object Correction page and view the migration and syntax conversion details.
- Click Start. Objects start to be migrated to the target database.
If the migration is successful, you can log in to the target database to view the migrated objects. You can also perform 3 to view the migrated objects.
If the migration fails, click Details next to a failed object and manually correct the object by following Correcting Objects That Failed to Be Converted.
- After the migration is complete, click Migration History to view the migration details.
Detailed information of the migrated projects is displayed in the descending order. The information includes the serial number, total count, migration succeed, migration failed. Click Details to view details.
- Click Details to view information such as object types, total number of objects, and migration result (successful or failed).
- Locate an object type and click Details to view its details. The detailed information includes the schema, object name, object types, and migration status. You can search for an object by name or view details about each schema.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot