All Products
Search
Document Center

Collect database information

Last Updated: Mar 08, 2021

Download a Database Collector client to collect database information

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

  1. Download a Database Collector client

    1. Log on to the ADAM console.

    2. In the left-side navigation pane, choose Database Migration > Evaluate DB.

    3. On the Collect DB Information tab, click Download Database Collector to go to the Download DB Collector page.

      Evaluate DB
    4. Select a Database Collector version. Download and decompress the corresponding package.

      Note

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

      • Network: accessible to the source Oracle database

      • CPU: 2 cores

      • Memory: 8 GB

      • Hard disk: 100 GB free space

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

      1. Log on to the source Oracle 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.

        Note

        The following permissions are used to access the Oracle database. If you have these permissions, you can collect, mask, and export database information.

        • If the source database is an Oracle 10g, 11g, or 12c database, 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;
        • If the source database is an Oracle 12c database, 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;
      3. Collect structured data to generate feasibility reports and compatibility reports.

        The ADAM database collector allows you to collect the information of existing Oracle databases Oracle 10g, 11g, and 12c 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. The .bat command is applicable to Database Collector in Windows and the .sh command is applicable to Database Collector in Linux.

          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>

            - -h: specifies the IP address of the Oracle 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 the Database Collector client 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.