OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Assessment

V4.4.2Enterprise Edition
  • Product Introduction
    • Overview
    • Application scenarios
    • System architecture
    • Product form
  • Install OMA
  • Compatibility assessment
    • Overview
    • Assess the compatibility with objects
    • Assess the compatibility with SQL statements
    • Assess the compatibility with business code
    • Export SQL statements from an OceanBase database
    • Database assessment
      • Overview
      • Assess an Oracle database
      • Assess a MySQL database
      • Assess a TiDB database
      • Assess a PostgreSQL database
      • Assess a DB2 LUW database
  • Performance assessment
    • Standalone edition
      • Overview
      • Assess the performance differences between an Oracle database and an OceanBase database
      • Assess the performance differences between a MySQL database and an OceanBase database
      • Assess the performance differences between different versions of OceanBase Database

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Assessment
  3. V4.4.2

Assess a PostgreSQL database

Last Updated:2026-09-04 08:16:35

Prerequisites
Grant user privileges
Run the assessment command
View an assessment report

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

Prerequisites

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

Grant user privileges

  1. Grant user the required privileges to connect to the database.

    GRANT CONNECT ON DATABASE <your_database> TO <user_name>;
    
  2. Grant user the USAGE privilege on the schema.

    GRANT USAGE ON SCHEMA <schema_name> TO <user_name>;
    
  3. Assign a monitoring role (containing all required privileges) to the user.

    GRANT pg_monitor TO <user_name>;
    
  4. Grant user the query privilege on system catalogs.

    GRANT USAGE ON SCHEMA pg_catalog TO <user_name>;
    
  5. Grant user the required privileges to execute the system functions.

    GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pg_catalog TO <user_name>;
    

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 testPG \
# 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 POSTGRESQL \        
# The version of the source database.
--source-db-version 10 \        
# 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. dbName specifies the name of the database to be assessed. Separate multiple schemas with commas (,).
--schemas "dbName1.s1,dbName2.s2" \     
# The type of the target database.
--target-db-type OBMYSQL \    
# The version of the target database, including 2.2.50, 2.2.70, 3.1.20, 4.2.x, 4.3.5, and 4.4.2.
# 2.2.50 represents the 2.2.5x versions, 2.2.70 represents the 2.2.7x versions, 3.1.20 represents the 3.1.x versions, and 4.2.x represents 4.2.0, 4.2.1, 4.2.2, and 4.2.5.
--target-db-version 4.3.5

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.

Previous topic

Assess a TiDB database
Last

Next topic

Assess a DB2 LUW database
Next
on this page
Prerequisites
Grant user privileges
Run the assessment command
View an assessment report