oracle12c data migration to DM7

There are currently two methods I know. The first is to directly migrate data through the DM data migration tool. The applicable scenario of this method is that the server where the Dameng database is located and the server where the oracle is located can communicate with each other; the second is the server where the oracle database is located. Install the Dameng database, import the data from oracle and then export the data from the Dameng database into a dmp file, and then import the data into the Dameng database to be migrated.

Look at the first one:

First, open the DM data migration tool, right-click on the left blank and click New Project, the project name can be filled in at will, I am filling in o data migration,

Click OK after filling in

After the creation is complete, the project name you created will appear on the top. After clicking open, right-click the migration below, and the page for creating a new migration will appear. The migration name can be written as you like. I wrote oracle here, and then click OK.

Then I jumped to the following page, and then click Next

Choose Oracle==》DM7 as the migration method

 

Then fill in the oracle database connection information

Then there is Dameng database connection information

 

Then select the database, table, view, sequence, stored procedure, etc. you want to migrate

 

Then click Next to select the various objects to be migrated

 

Then click Finish in the next step

 

The data can be transferred successfully.

 

The above is the first data migration method,

 

 

The second method is the same as the first one, except that it needs to be backed up as a dmp file after the local migration reaches the dream database.

Grammar format

BACKUP DATABASE <database name> [FULL | INCREMENT] TO <backup name> [BAKFILE'<backup path>'] [BACKUPINFO'<backup description>'] [MAXSIZE <limit size>] [IDENTIFIED BY <key>[WITH ENCRYPTION]] [COMPRESSED];

Parameters 1. Database name: the name of the database to be backed up

         2. FULL|INCREMENT: backup type, FULL is full backup, INCREMENT incremental backup

         3. Backup name: the name of the backup, which is used to identify different backups in DMDBMS

         4. Backup path: the full path where the backup file is stored

         5. Backup description: description of the backup

         6. Restricted size: the maximum backup file size, the minimum is 16M, and the maximum is unlimited

         7. Key: backup encryption by using IDENTIFIED BY to specify the password

         8. Encryption type: WITH ENCRPYTION is used to specify the encryption type

         9. Backup compression: Use the COMPRESSED clause to specify whether to compress. If used, it means compression, otherwise it means no compression 

 

According to normal requirements, it is actually very simple:

Example Assuming that there is a database BOOKSHOP, perform a full backup of it, the backup name is BOOKSHOP_BAK1 and stored in D drive 

 BACKUP DATABASE BOOKSHOP FULL TO D:/BOOKSHOP_BAK1; 

 

Move to the Dameng database server where you want to migrate data, and then restore the database

 

 

Grammar description

RESTORE DATABASE <database name> <FULL | INCREMENT> FROM ['<file path>' | BACKUP <backup name>][UNTIL TIME <point in time>][DBFILE <restore file> {, <restore file>}] [SET ARCHIVEDIR TO'<Archive Path>'{,'<Archive Path>'}] [[ARCHIVELOG | NOARCHIVELOG] [ARCHIVEDIR'<Archive Path>']] [BACKUPDIR'<Backup File Path>'] [IDENTIFIED BY <Key >] <Restore file>::=SET <file ID> TO'<file path>'

Parameters 1. Database name: The database to be restored.

        2. FULL|INCREMENT: Specifies whether to use full recovery or incremental recovery for this recovery.

        3. File path: Specify the full path of the backup file used for restoration.

        4. Backup name: Specify the backup name of the backup used for restoration.

        5. File ID: The number of the file in the backup. The corresponding file path can be obtained by calling the stored procedure sp_bak_get_db_file_list(pathname varchar(256)).

       6. File path: The recovery file path specified for the file with the corresponding number in the backup.

       7. Archive path: The path of the archive log when the archive log is used for recovery.

       8. ARCHIVELOG | NOARCHIVELOG: Whether to enable archive logging.

       9. Archive path: The storage path of archive logs.

      10. Backup file path: the storage path of the backup file.

      11. Time point: use UNTIL TIME to specify the time point of recovery

      12. Key: backup encryption by using IDENTIFIED BY to specify the password 

 

Generally speaking, it is not as complicated as above  

For example, use the backup BOOKSHOP_BAK1 to restore the database BOOKSHOP. Through the system storage function SF_GET_BAK_BY_NAME, you can know the backup file path of the backup. Suppose it is: C:\DMDBMS\data\BOOKSHOP_BAK1.bak. The restore operation can be performed by the following statement

RESTORE DATABASE BOOKSHOP FULL FROM ' C:\DMDBMS\data\BOOKSHOP_BAK1.bak';

This operation can also directly use the backup name to restore without checking the path of the backup file, as follows:

RESTORE DATABASE BOOKSHOP FULL FROM BACKUP BOOKSHOP_BAK1;

 

 

So far, both methods have completed data migration.

Guess you like

Origin blog.csdn.net/qq_37823979/article/details/105952525