Help Center/ Migration Center/ Best Practices/ Collecting Details of Self-built Oracle Databases
Updated on 2025-08-20 GMT+08:00

Collecting Details of Self-built Oracle Databases

Scenarios

MgC enables you to discover self-built Oracle databases and collect their details. The operation procedure also applies to service-based Oracle databases.

Collection Process

  1. You install the MgC Agent (formerly Edge) on a Windows or Linux server that can communicate with your self-built Oracle databases.
  2. The MgC Agent accesses your Oracle databases using the connection credentials you provided. The provided account must have the SELECT ANY DICTIONARY permission. Otherwise, not all details can be collected.
  3. MgC delivers a collection command to the MgC Agent through IoTDA. After receiving the commands, the MgC Agent creates an Oracle database collection task.
  4. The MgC Agent invokes the Oracle database collector through RPC. Then the collector queries data by invoking database commands and concatenating SQL statements.
  5. The collector reports the collected data to the MgC Agent through RPC. The MgC Agent processes RPC messages and reports the collected data to MgC through IoTDA.
  6. MgC processes and stores the collected data.
    Figure 1 Collection flowchart

Required Inputs

Parameter

Mandatory

Description

ip

Yes

The IP address of the database instance.

port

Yes

The port used by the Oracle database instance.

user

Yes

The username for accessing the Oracle database instance. The account must have the SELECT ANY DICTIONARY permission.

password

Yes

The password of the Oracle database instance account.

sid

No

The unique identifier of the Oracle database instance. You only need to provide the ID or the service name of the database instance.

serviceName

No

The service name of the Oracle database instance. You only need to provide the ID or the service name of the database instance.

Collected Data

For details, see Table 1, Table 2, Table 3, and Table 4.
Table 1 Description of collected data

Field

Description

name

The database instance name.

connectAddress

The access IP address.

useSsl

Whether SSL is enabled.

instanceId

The instance ID.

vpcId

vpcId

subnetId

The subnet ID.

privateAddress

The private access address.

publicAddress

The public access address.

type

The cluster type.

dbType

The database type.

nodes

The cluster nodes. For details, see Collected node data.

dbVersion

The database engine version.

oracleDatabases

The database list. For details, see Description of the oracleDatabases field.

serverCharset

The server character set.

fileStorageMode

The file storage mode.

backupMode

The backup mode.

deployMode

The deployment mode.

racNodesNum

The number of RAC nodes.

redundancyType

Whether DR is configured.

dbRelational

Whether the database instance is connected with other instances.

oracleInstances

The details of database nodes. For details, see Description of the oracleInstances field.

Table 2 Description of the nodes field

Field

Description

name

The cluster node name.

host

The cluster node host.

role

The cluster node role.

status

The cluster node status.

flavor

The cluster node flavor.

cpuSize

CPU

memorySize

The memory size.

diskType

The disk type.

diskSize

The disk size.

Table 3 Description of the oracleDatabases field

Field

Description

databaseName

The database name.

databaseSize

The size of data stored in the database.

Table 4 Description of the oracleInstances field

Field

Description

instanceName

The database instance name.

archive

Whether archive is enabled

patches

The database patches.

controlFiles

The control file location.

redologFiles

The location of the redo files.

archiveFreq

The archive frequency.

dataBaseRole

The database role.

Constraints

  • Only username/password pairs are supported.
  • The provided Oracle account must have the SELECT ANY DICTIONARY permission.
  • Due to network restrictions, the collection may fail. In this case, you can restart the collector to solve the problem.

    SELECT ANY DICTIONARY is a system permission that allows users to query all data dictionaries of a database. A data dictionary is a central repository for storing database structure information, including tables, columns, data types, and constraints.

  • Only online collection is supported.

Preparations

  • You have obtained the IP address, port, service name or SID, username, and password of the source Oracle database. in Oracle databases, the default service name is often set to ORCL. You need to specify the service name of the Oracle database to be collected.

    You can log in to the Oracle database instance and run the following command to view the names of all registered services:

    SELECT instance_name from v$instance

Collecting Details of Oracle Databases

  1. Sign in to the MgC console. In the navigation pane, under Project, select an application migration project from the drop-down list.
  2. In the navigation pane, choose Source Resources.
  3. Click the Databases tab.
  4. Click Add above the list.

    Figure 2 Adding a database

  5. Set the parameters listed in Table 5.

    Table 5 Parameters for adding a database

    Parameter

    Description

    Name

    User-defined

    MgC Agent

    Select the MgC Agent connected to MgC.

    Type

    Select Oracle.

    IP Address

    Enter the IP address for connecting to the source Oracle database server.

    Port

    Enter the listening port of the source Oracle database. The default value is 1521.

    Service Name/SID

    Enter the service name of the source database. The default value is ORCL.

    You can log in to the Oracle database server and run the following command to view the service name of the database you want to add to MgC:
    SELECT instance_name FROM v$instance;

    Credential

    Select the database credential. If the credential is not displayed in the drop-down list, go to the MgC Agent console, add the credential, and synchronize it to MgC. When you add the credential to the MgC Agent, set Resource Type to Database and Authentication to Username/Password.

  6. Click Confirm. The system automatically starts collecting details about the database. When Collected shows up in the Deep Collection column, the collection is complete. Click the database name. On the displayed database details page, you can view the collected information.

Generating Target Recommendations

  1. In the navigation pane, choose Migration Path.
  2. On the Target Recommendations tab, click Generate Target Recommendations.
  3. Enter a report name, set Scope to Select Resource, and select the Oracle databases to be assessed.
  4. Configure an assessment policy based on Table 6.

    Table 6 Settings used for computing target recommendations

    Parameter

    Description

    Target Region

    Select the region where you want to purchase resources on Huawei Cloud. You are advised to select a region close to your target users for lower network latency and quick access.

    Assessment Policy

    • Match source configuration

      MgC recommends the right Huawei Cloud resources based on source resource specifications.

    • Match business scenario

      MgC recommends the right Huawei Cloud resources based on the business scenario of source resources and Huawei Cloud best practices.

    • Cross-AZ migration

      This policy only applies to migration of ECSs between AZs on Huawei Cloud, and MgC only assesses servers in the application. You need to select the target AZ you want to migrate to.

    Priority

    • High performance

      MgC recommends target resources designed for optimal performance.

    • Low cost

      MgC recommends the most cost-effective target resources that meet your demands.

    Billing Mode

    • Yearly/Monthly is a prepaid billing mode. If you expect to use resources for a longer period, you can save money by selecting the yearly/monthly billing mode.
    • Pay-per-use billing is a postpaid mode in which you pay for what you use. This billing mode requires no upfront or long-term commitments.

    (Optional) Preferences

    Here you can configure your preferences for servers. Do not configure them in this practice.

  5. Click Create Assessment. After the assessment task is complete, you can view target recommendations which include the recommended configurations of target resources.

Viewing Target Recommendations

On the Target Recommendations page, click the corresponding assessment report to view the assessment details.

In the Target Configurations area, you can view recommendations for each type of resources. The Target Configuration column displays the recommended specifications of Huawei Cloud resources based on the source resource specifications and assessment settings. The Assessment Priority column shows how you balance performance and costs and the migration strategy. The Billing Mode column shows the billing mode you selected for target resources. The Cost Estimation column provides the estimated costs of the recommended Huawei Cloud resources.
Figure 3 Viewing target recommendations