Assess a TiDB database

2023-12-01 09:06:04  Updated

In the assessment of a TiDB database, only objects are assessed.

Prerequisites

OceanBase Migration Assessment (OMA) is installed. For more information, see Install OMA.

Run the assessment command

Go to the installation directory of OMA and run start.sh with reference to the following sample statement. For more information about the parameters in the statement, see Product form. In Microsoft Windows, replace sh bin/start.sh with start.bat.

sh bin/start.sh \
# The task name, which can be set to any value.
--name MYSQL_TEST \
# The assessment mode. ANALYZE_TOTAL indicates a database assessment.
--mode ANALYZE_TOTAL \
# The assessment type. Only OBJECT is supported.
--analyze-types OBJECT \
# The data source. DB indicates a database.
--from-type DB \     
# The assessment mode.
--evaluate-mode SOURCE_TARGET \
# The type of the source database.
--source-db-type TIDB \      
# The version of the source database.
--source-db-version 4.0 \       
# The address of the source database.
--source-db-host xxx.xxx.xxx.xxx\    
# The port of the source database.
--source-db-port port \        
# The username of the source database.
--source-db-user username \        
# The password of the source database.
--source-db-password password \   
# The schema to be assessed.
--schemas test \    
# The type of the destination database.
--target-db-type OBMYSQL \    
# The version of the destination database.
--target-db-version 2.2.x

After you run the preceding commands, you can view the progress in real time.

View an assessment report

After the assessment is completed, OMA generates an assessment report in the .pdf format in the report directory and an assessment report in the HTML format in the reportTool directory.

  • To view the assessment report in the .pdf format, go to the report directory and open the PDF file of the name in the path displayed in the CLI.

  • To view the assessment report in the HTML format, perform the following steps:

    1. Go to the reportTool directory, double-click the index.html file.

    2. On the page that appears, click Authorize and View Report.

    3. Select and open the oma.sqlite file.

      Generally, the oma.sqlite file is stored in the db folder under the root directory of OMA.

    4. On the page that appears after you open the oma.sqlite file, click Select Report in the upper-right corner and select the migration assessment report that you want to view from the drop-down list.

Contact Us