当前位置:网站首页>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 .
边栏推荐
- DC-1靶场搭建及渗透实战详细过程(DC靶场系列)
- The difference between vectorresize and reverse.
- Pytoch yolov5 runs bug solution from 0:
- Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
- Leetcode merge sort linked list
- Yolov5 network modification tutorial (modify the backbone to efficientnet, mobilenet3, regnet, etc.)
- Wechat applet map annotation
- [understand one article] FD_ Use of set
- idea自動導包和自動删包設置
- Unity particle Foundation
猜你喜欢

Yolov5网络修改教程(将backbone修改为EfficientNet、MobileNet3、RegNet等)

The solution to the complexity brought by lambda expression

Embedded-c language-8-character pointer array / large program implementation

One click generation and conversion of markdown directory to word format

Thinkphp內核工單系統源碼商業開源版 多用戶+多客服+短信+郵件通知

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

Cannot activate CONDA virtual environment in vscode

Markdown编辑语法
![[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)](/img/e1/620443dbc6ea8b326e1242f25d6d74.jpg)
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)

Pytoch --- use pytoch to realize u-net semantic segmentation
随机推荐
缓存一致性解决方案——改数据时如何保证缓存和数据库中数据的一致性
Summary of common string processing functions in C language
Yyds dry inventory compiler and compiler tools
Idea autoguide package and autodelete package Settings
Vmware安装win10报错:operating system not found
Pytorch-Yolov5从0运行Bug解决:
LeetCode-归并排序链表
Binary tree problem solving (2)
深圳打造全球“鸿蒙欧拉之城”将加快培育生态,优秀项目最高资助 1000 万元
Ten thousand volumes are known to all, and one page of a book is always relevant. TVP reading club will take you through the reading puzzle!
Thinkphp內核工單系統源碼商業開源版 多用戶+多客服+短信+郵件通知
Common locks in MySQL
Several methods of capturing packets under CS framework
MySQL table insert Chinese change? Solution to the problem of No
Which insurance company has a better product of anti-cancer insurance?
Record the bug of unity 2020.3.31f1 once
Mysql中常见的锁
Gin framework learning code
Mysql database learning
Let genuine SMS pressure measurement open source code