当前位置:网站首页>Online incremental migration of DM database
Online incremental migration of DM database
2022-07-02 04:38:00 【Song Xiaorong】
In the actual production environment , We need to complete the database migration in a very short time , The traditional backup and restore method takes a long time , May not meet the migration needs . This requires Online incremental migration To migrate the database . principle : Restore the target library through the backup set to rebuild the data file 、 Redo Log files , Update control files and other operations , And redo the archive log in the recovery phase to restore the target database to the latest state .
We have two database servers : The source server ( Winning Qilin 7、DM8), Target server (windows10、DM8), Now you want to migrate the data of the source server database online incrementally to the target server , The source database must be archived .
The specific operation steps are as follows :
1
View the mode of the source library
select name,arch_mode from v$database;

If the archive is not opened , Then open the archive mode :
alter database mountalter database add archivelog‘type=local,dest=/dm/arch,file_,space_limit=0’;alter database open
2
View the data file and other paths of the source library
select file_name,tablespace_name from dba_data_files;
3
Copy the database related files of the source server to the target database
(1) Record source library's BEGIN_LSN/BEGIN_SEQ Information
Before starting copying , Call system procedure SP_BACKUP_COPY, Record the current system BEGIN_LSN/BEGIN_SEQ Information modification parameter file
SP_BACKUP_COPY_BEGIN()

(2) use xftp Software copy A Server database related files to B In the relevant directory of the server

(3) After copying , Call system procedure SP_BACKUP_COPY_END, Generate a backup set file
SP_BACKUP_COPY_END('/dm8/backup/bak_copy')
(4) Copy the backup set file generated by the source server to the target server

4
Modify the parameter file and control file on the target server
(1) Modify parameter file
Set the parameter file dm.ini in , It's about the path /dm8/data/DAMENG, Replace all with D:\dmdbms\data
(2) Modify the control file
① Convert binary files to text files , Then edit the content
dmctlcvt TYPE=1 SRC=D:\dmdbms\data\dm.ctl DEST=D:\dmdbms\data\dmctl.txt

② take dmctl.txt The path is involved in the file /dm8/data/DAMENG, Replace all with D:\dmdbms\data
③ Put the text file dmctl.txt Convert to binary dm.ctl

5
Start the database of the target server to the configuration (mount) state
(1) Start the Damon database configuration assistant , Select register database service

(2) Select parameter file

6
Restore the database on the target server
(1) Close the database

(2) Execution restore
dmrmanrestore database 'D:\dmdbms\data\dm.ini' from backupset 'D:\dmdbms\backup';

(3) Copy the newly generated archive log file on the source server to the archive path of the target server
(4) Perform recovery
RECOVER DATABASE 'D:\dmdbms\data\dm.ini' WITH ARCHIVEDIR 'D:\dmdbms\arch';

RECOVER DATABASE 'D:\dmdbms\data\dm.ini' UPDATE DB_MAGIC;
(5) Start the database on the target server

matters needing attention :
(1) The database must be archived ;
(2) When calling system procedures SP_BACKUP_COPY_BEGIN after , Can't go on create tablespace/drop tablespace Wait for the operation ;
(3)SP_BACKUP_COPY_BEGIN and SP_BACKUP_COPY_END Must be executed in the same session ;
(4) When executed UPDATEDB_MAGIC After the operation , You can no longer perform incremental recovery of archived logs , Only the database can be opened .
边栏推荐
- Several methods of capturing packets under CS framework
- Realize the function of data uploading
- Introduction to JSON usage scenarios and precautions
- Research on the security of ognl and El expressions and memory horse
- Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects
- Pytoch yolov5 runs bug solution from 0:
- BGP experiment the next day
- Why can't you remember when reading? Why can't you remember- My technology learning methodology
- Geotrust OV Multi - Domain Domain SSL Certificate rmb2100 per year contains several Domain names?
- 二叉树解题(二)
猜你喜欢

社交媒体搜索引擎优化及其重要性

C language practice - number guessing game

Pytoch --- use pytoch for image positioning

Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects

【c语言】基础篇学习笔记

Learn what definitelytyped is through the typescript development environment of SAP ui5

Three years of experience in Android development interview (I regret that I didn't get n+1, Android bottom development tutorial

What methods should service define?

Idea autoguide package and autodelete package Settings

ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
随机推荐
Learn what definitelytyped is through the typescript development environment of SAP ui5
Record the bug of unity 2020.3.31f1 once
【c语言】动态规划---入门到起立
Deep understanding of lambda expressions
Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
C language guessing numbers game
win10 磁盘管理 压缩卷 无法启动问题
TypeScript函数详解
Homework of the 16th week
Common locks in MySQL
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
Starting from the classification of database, I understand the map database
Shutdown procedure after 60
Websites that it people often visit
Dare to go out for an interview without learning some distributed technology?
C language practice - number guessing game
Why can't you remember when reading? Why can't you remember- My technology learning methodology
Pytorch---使用Pytorch实现U-Net进行语义分割
cookie、session、tooken
Research on the security of ognl and El expressions and memory horse