All Products
Search
Document Center

Collect database information

Last Updated: Nov 04, 2021

Download Database Collector

If you cannot access the source database over the Internet or from Alibaba Cloud, you must collect database information offline.

  1. Download Database Collector

    1. Log on to the Advanced Database & Application Migration (ADAM) console.

    2. In the left-side navigation pane, click Evaluate DB.

    3. In the Collect DB Information step, click Download Database Collector

    4. In the Download Database Collector panel, select a Database Collector version, and then download and decompress the corresponding package.

      Note

      We recommend that you do not run Database Collector on the server on which the source database is installed. The server on which you want to install Database Collector must meet the following requirements:

      • Network: accessible to the source database

      • CPU: 2 cores

      • Memory: 8 GB

      • Hard disk: 100 GB free space

    5. Create and authorize an account to collect database information.

      1. Log on to the source database.

      2. Create a temporary account by using an account that has the SYSDBA permission, and then grant the following permissions to the temporary account. If you already have an account that has the following permissions, skip this step.

        • Oracle 10g, 11g, or 12c: Create a local user in a non-CDB architecture.

          1. Create an account named eoa_user and set the password to eoaPASSW0RD.

            create user eoa_user identified by eoaPASSW0RD default tablespace users;
          2. Grant the SELECT permissions.

            grant connect,resource,select_catalog_role,select any dictionary to eoa_user;
          3. Grant permissions on the DBMS_LOGMNR package.

            Note

            If the source database is an Oracle 10g database, you must first run the following statement:

            create or replace public synonym DBMS_LOGMNR for sys.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;
        • Oracle 12c: Connect to an Oracle 12c container database (CDB) to 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;
        • Teradate 13 / 14 / 15

          1. You need to use an account that has permissions to access the DBC database.

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

          1. Use a database administrator account that has the permissions to run the Db2look command.

      3. Collect structured data to generate feasibility reports and compatibility reports.

        Database Collector can collect the information of Oracle databases (version 10g, 11g, or 12c), Teradata databases (version 13, 14. or 15), and Db2 for LUW databases.If you encounter problems during the database collection, submit a ticket and attach the files in the logs directory where the database collector is installed.

        1. Run the following command to collect database information. If you install Database Collector in Windows, run the .bat command. If you install Database Collector in Linux, run the .sh command.

          1. Oracle 10g

            collect_10g[.sh|.bat] -h -u -p -d <service_name>
          2. 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>
          3. Oracle 12c

            Note

            You can use the collect_11gR2 script to collect the information of a pluggable database (PDB) in Oracle 12c. collect_12c[.sh|.bat] -h <host> -u <username> -p <password> -P <port> -d <service_name> -s <sid>

          4. Teradate 13 / 14 / 15

            collect_td[.sh] -h ip -p password -u username
          5. DB2_LUW

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

            -h: specifies the IP address of the database. -u: specifies the username as eoa_user. -p: specifies the password as eoaPASSW0RD. -P: specifies the port of the Oracle database. Example: 1521. -d: specifies the service name of the Oracle database. For example, 12c is the service name for a specific PDB. -s: specifies the name of the Oracle database instance. This option is required only for Oracle 12c.

        2. Export the collection results.

          After the collection is complete, a data packet is generated and the path of the data packet is displayed. The following script shows the log file:

          [***] ******************************************************************
          [***] *     Collect Successfully!
          [***] *
          [***] * Complete the file packaging, the package result path is: 
          [***] *        ~rainmeter/out/data.zip ******************************************************************
        3. After the migration is complete, delete the temporary account.

          Use an account that has the SYSDBA permission to access the database in Database Collector and execute the following SQL statement:

          1. Oracle 10g, 11g, or 12c (non-CDB)

            drop user eoa_user cascade;
          2. Oracle 12c (CDB)

            drop user c##eoa_user cascade;
    Note

    Database Collector consumes only a small amount of memory in Oracle databases, and does not require high-performance CPUs. In the beginning of a collection task, the CPU usage of your server may increase due to the getDDL operation. The increase rate varies based on the Oracle instance type and the current load. We recommend that you collect database information during off-peak hours to increase the collection speed.