All Products
Search
Document Center

Data Transmission Service:Collect database information

Last Updated:Oct 30, 2023

This topic describes how to use two methods provided by Advanced Database & Application Migration (ADAM) to collect the information of a source database. If you can access the source database over the Internet or from Alibaba Cloud, you can collect database information online. If not, you can download a Database Collector client to collect database information.

Methods

  • Collect database information online: If you collect the information of a source database online, make sure that the source database can be accessed over the Internet. In addition, you must add the ADAM servers to a whitelist of the source database. For more information, see the "Collect the information of a database online" section of this topic.

    • Connection over the Internet: If your source database has a public IP address, you can collect the information of the database over the Internet.

    • Connection over Database Gateway: If your source database does not have a public IP address, you can collect the information of the database over Database Gateway (DG). Database Gateway is a database connection service that provides remote access to various databases. Database Gateway allows you to access and manage databases that are deployed on data centers or third-party cloud platforms without the need to use a public IP address. For more information, see What is Database Gateway?

      Note

      ADAM supports DG instances in the China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Hangzhou), and China (Shanghai) regions.

  • Download a Database Collector client: If a source database cannot be accessed over the Internet or from Alibaba Cloud, you can use the ADAM Database Collector to collect the information of the source database offline. For more information, see the "Use Database Collector to collect the information of a source database" section of this topic.

Collect the information of a database online

  1. Log on to the Data Management (DMS) console V5.0.

  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Heterogeneous Database Migration (ADAM) > Database Evaluation.

  3. On the Database Collection tab, click Online Database Collection.

  4. On the Collect DB Information tab, click Create Collection Task.

  5. Log on to the source database, and then create and authorize an account to collect the information of the source database.

    • If the source database is an Oracle 10g, 11g, 12c, 18c, or 19c non-container database (non-CDB), create a local user.

      1. Create a user named eoa_user and set the password to eoaPASSW0RD.

        create user eoa_user identified by eoaPASSW0RD default tablespace users;

      2. Grant the permissions to query the data of the source database to the eoa_user user.

        grant connect,resource,select_catalog_role,select any dictionary to eoa_user;

      3. Grant permissions on the DBMS_LOGMNR package to the eoa_user user.

        Note

        If the source database is an Oracle 10g database, run the following command before you grant permissions on the DBMS_LOGMNR package to the eoa_user user: create or replacepublicsynonymDBMS_LOGMNRforsys.dbms_logmnr;

        grant execute on DBMS_LOGMNR to eoa_user;
      4. Grant permissions on the DBMS_METADATA package to query DDL statements.

        grant execute on dbms_metadata to eoa_user;
      5. Grant permissions to query transactions.

        grant select any transaction to eoa_user;
      6. Grant permissions to query tables.

        grant select any table to eoa_user;
      7. Grant permissions to analyze tables.

        grant analyze any to eoa_user;
      8. Grant permissions to generate random numbers.

        grant execute on dbms_random to eoa_user;
    • If the source database is an Oracle 12c, 18c, or 19c container database (CDB), create a common user.

      create user c##eoa_user identified by "eoaPASSW0RD" default tablespace users;
                                          grant connect,resource,select_catalog_role,select any dictionary to c##eoa_user container=all;
                                          grant execute on DBMS_LOGMNR to c##eoa_user container=all;
                                          grant execute on dbms_metadata to c##eoa_user container=all;
                                          grant select any table to c##eoa_user container=all;
                                          grant select any transaction to c##eoa_user container=all;
                                          grant analyze any to c##eoa_user container=all;
                                          grant execute on dbms_random to c##eoa_user container=all;
                                          alter user c##eoa_user set container_data=all container=current;
    • Teradata 13, 14, or 15

      If the source database runs Teradata 13, 14, or 15, grant the permissions on the CAN database files (DBC) of the database to the user that you want to use to collect the information of the source database.

      grant select,show on dbc to (username)
    • Db2 LUW

      If the source database is a Db2 for LUW database, the user that you want to use to collect the information of the source database must be granted the permissions to run the db2look command. You must grant the database administrator (DBA) permissions to the user.

  6. After you configure the source database account, click Next to go to the Create Collection Task panel.

    1. Collection Task Name: Enter the name of the collection task.

    2. Select the type of the source database.

      • Select ORACLE as the source database type.

        Server Name/SID: Enter the server name or system ID (SID) of the source Oracle database.

      • Select TERADATA or Db2_LUW as the source database type.

        Database Name: Enter the name of the source database.

    3. Select the network type of the source database.

      1. Select Database with Public IP Address.

      2. Select Database Without Public IP Address or Port Number (Connected over Database Gateway).

        • DG Region: Select the region where the database gateway created for the source database resides.

        • DG Instance: Select the ID of the database gateway created for the source database.

    4. Enter additional information of the source database.

      • Host IP: Enter the IP address of the source database.

        Note

        You must add the CIDR blocks of ADAM servers to a whitelist of the source database to make sure that ADAM can collect the information of the source database online. For more information, see Configure the whitelist.

      • Port Number: Enter the port that is used to connect to the source database.

      • Username: Enter the account that is created in Step 5.

      • Password: Enter the password of the account.

      • (Optional) Advanced Settings: Enter the encoding method of the source database in the Encoding field.

  7. Click Test Connectivity to perform a test. After the test succeeds, click Start Collection.

  8. After the collection task is completed, select the collection task and click Next: Create Profile to create a database profile.

Use Database Collector to collect the information of a source database

  1. Log on to the DMS console V5.0.

  2. In the top navigation bar, click DTS. In the left-side navigation pane, choose Heterogeneous Database Migration (ADAM) > Database Evaluation.

  3. On the Database Collection tab, click Download Database Collector.

  4. In the Download Database Collector panel, download a Database Collector client based on the operating system of your computer. Then, decompress the package and install the Database Collector client.

    Note

    We recommend that you do not install the Database Collector client on the server of the source database. Your computer must meet the following requirements:

    • Network: Your computer can connect to the source database.

    • CPU: 2 cores or more.

    • Memory: 8 GB or more.

    • Disk: 100 GB disk space is available.

  5. Log on to the source database, and then create and authorize an account to collect the information of the source database.

    Create a temporary user by using the credentials of a user that is granted the SYSDBA permission, and then grant the required permissions to the temporary user.

    Note

    If an existing user of the source database is granted the required permissions, you can use the credentials of the existing user to collect the information of the source database.

    • If the source database is an Oracle 10g, 11g, 12c, 18c, or 19c non-CDB, create a local user.

      1. Create a user named eoa_user and set the password to eoaPASSW0RD.

        create user eoa_user identified by eoaPASSW0RD default tablespace users;

      2. Grant the permissions to query the data of the source database to the eoa_user user.

        grant connect,resource,select_catalog_role,select any dictionary to eoa_user;

      3. Grant permissions on the DBMS_LOGMNR package to the eoa_user user.

        Note

        If the source database is an Oracle 10g database, run the following command before you grant permissions on the DBMS_LOGMNR package to the eoa_user user: create or replacepublicsynonymDBMS_LOGMNRforsys.dbms_logmnr;

        grant execute on DBMS_LOGMNR to eoa_user;
      4. Grant permissions on the DBMS_METADATA package to query DDL statements.

        grant execute on dbms_metadata to eoa_user;
      5. Grant permissions to query transactions.

        grant select any transaction to eoa_user;
      6. Grant permissions to query tables.

        grant select any table to eoa_user;
      7. Grant permissions to analyze tables.

        grant analyze any to eoa_user;
      8. Grant permissions to generate random numbers.

        grant execute on dbms_random to eoa_user;
    • If the source database is an Oracle 12c, 18c, or 19c CDB, create a common user.

      create user c##eoa_user identified by "eoaPASSW0RD" default tablespace users;
                                          grant connect,resource,select_catalog_role,select any dictionary to c##eoa_user container=all;
                                          grant execute on DBMS_LOGMNR to c##eoa_user container=all;
                                          grant execute on dbms_metadata to c##eoa_user container=all;
                                          grant select any table to c##eoa_user container=all;
                                          grant select any transaction to c##eoa_user container=all;
                                          grant analyze any to c##eoa_user container=all;
                                          grant execute on dbms_random to c##eoa_user container=all;
                                          alter user c##eoa_user set container_data=all container=current;
    • Teradata 13, 14, or 15

      If the source database runs Teradata 13, 14, or 15, grant the permissions on the DBC of the database to the user that you want to use to collect the information of the source database.

      grant select,show on dbc to (username)
    • Db2 LUW

      If the source database is a Db2 for LUW database, the user that you want to use to collect the information of the source database must be granted the permissions to run the db2look command. You must grant the DBA permissions to the user.

  6. Collect the structured data of the source database. The structured data is used to generate feasibility reports and compatibility reports.

    1. Run the required command to collect the information of the source database.

      Note

      If the Database Collector client runs on Windows, run the .bat command. If the Database Collector client runs on Linux, run the .sh command.

      • Oracle 10g

        collect_10g[.sh|.bat] -h -u -p -d <service_name>
      • Oracle 11g

        • Oracle 11g R1

          collect_11gR1[.sh|.bat] -h -u -p -d <service_name>
        • Oracle 11g R2

          collect_11gR2[.sh|.bat] -h -u -p -d <service_name>
      • Oracle 12c 18c 19c

        Note

        You can use the collect_12c script to collect the information of an Oracle 12c pluggable database (PDB). For more information, see the description of Oracle 11g. collect_12c[.sh.bat] -h <host> -u <username> -p <password> -P <port> -d <service_name> -s <sid>

      • Teradate 13 14 15

        collect_td[.sh] -h ip -p password -u username
      • Db2_LUW

        collect_db2_luw[.sh] -h ip -u username -p password -d databasename -P port

      -h: the IP address of the source database. - -u: the username is collected. The Example user is eao_user. - -p: the password of the eoa_user user. The password is eoaPASSW0RD. -P: the port that you want to use to collect the information of the source database. Example: 1521. -d: the service name of the source database. If the source database is an Oracle 12c database, specify the service name of the specified PDB. -s: the name of the source database instance.

    2. Export the collection results.

      After the collection task is completed, Database Collector generates a packet and returns the path of the packet. The following script shows the log file:

      [***] ******************************************************************
                                          [***] * Collect Successfully!
                                          [***] *
                                          [***] * Complete the file packaging, the package result path is:
                                          [***] * ~rainmeter/out/data.zip ******************************************************************

  7. (Optional) After the collection task is completed, delete the temporary user.

    Use the credentials of a user that is granted the SYSDBA permission to connect Database Collector to the source database and execute the drop statement to delete the temporary user.

    1. If the source database is an Oracle 10g, 11g, 12c, 18c, or 19c non-CDB, execute the following statement:

      drop user eoa_user cascade;
    2. If the source database is an Oracle 12c, 18c, or 19c CDB, execute the following statement:

      drop user c##eoa_user cascade;
Note
  • We recommend that you collect the information of your source database during off-peak hours. In most cases, Database Collector can complete the collection of database information in a short period of time during off-peak hours.

  • Database Collector does not require high-performance CPUs. If you perform the getDDL operation on objects in the source database, the CPU load of the database server may increase at the beginning of the collection task. The increase in CPU load varies based on the specifications and the current load of the source database.

  • Database Collector consumes a small amount of memory of the source database during information collection.