当前位置:网站首页>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 mount
alter 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
dmrman
restore 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 .
边栏推荐
- Wechat applet pull-down loading more waterfall flow loading
- [JS -- map string]
- Gin framework learning code
- 【提高课】ST表解决区间最值问题【2】
- [understand one article] FD_ Use of set
- Pytorch-Yolov5從0運行Bug解决:
- What methods should service define?
- Major domestic quantitative trading platforms
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- Okcc why is cloud call center better than traditional call center?
猜你喜欢
AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道
June book news | 9 new books are listed, with a strong lineup and eyes closed!
Actual combat | use composite material 3 in application
Exposure X8 Standard Version picture post filter PS, LR and other software plug-ins
cs架构下抓包的几种方法
Mysql database learning
win11安装pytorch-gpu遇到的坑
Cache consistency solution - how to ensure the consistency between the cache and the data in the database when changing data
Several methods of capturing packets under CS framework
Realize the function of data uploading
随机推荐
CorelDRAW Graphics Suite2022免费图形设计软件
Unit testing classic three questions: what, why, and how?
One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
Wechat applet JWT login issue token
Embedded-c language-8-character pointer array / large program implementation
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
Homework of the 16th week
Which insurance company has a better product of anti-cancer insurance?
How muddy is the water in the medical beauty industry with a market scale of 100 billion?
C - derived classes and constructors
LeetCode-对链表进行插入排序
Leetcode merge sort linked list
Actual combat | use composite material 3 in application
二叉树解题(二)
阿里云polkit pkexec 本地提权漏洞
Okcc why is cloud call center better than traditional call center?
BGP experiment the next day
Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
社交媒体搜索引擎优化及其重要性
Pytorch-Yolov5從0運行Bug解决: