当前位置:网站首页>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 .
边栏推荐
- Record the bug of unity 2020.3.31f1 once
- Binary tree problem solving (1)
- What methods should service define?
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- Pytoch yolov5 runs bug solution from 0:
- DC-1靶场搭建及渗透实战详细过程(DC靶场系列)
- powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
- 60后关机程序
- IDEA xml中sql没提示,且方言设置没用。
- win11安装pytorch-gpu遇到的坑
猜你喜欢
Actual combat | use composite material 3 in application
Gin framework learning code
社交媒体搜索引擎优化及其重要性
Why can't you remember when reading? Why can't you remember- My technology learning methodology
66.qt quick QML Custom Calendar component (supports vertical and horizontal screens)
One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
Markdown edit syntax
WiFi 5GHz frequency
CorelDRAW graphics suite2022 free graphic design software
A summary of common interview questions in 2022, including 25 technology stacks, has helped me successfully get an offer from Tencent
随机推荐
Recyclerview add header
Several methods of capturing packets under CS framework
Today's plan: February 15, 2022
缓存一致性解决方案——改数据时如何保证缓存和数据库中数据的一致性
10 minutes to understand CMS garbage collector in JVM
TypeScript函数详解
Pytoch yolov5 runs bug solution from 0:
Binary tree problem solving (1)
The difference between vectorresize and reverse.
There is no prompt for SQL in idea XML, and the dialect setting is useless.
C language practice - binary search (half search)
6月书讯 | 9本新书上市,阵容强大,闭眼入!
Gin framework learning code
Read "the way to clean code" - function names should express their behavior
Design and implementation of general interface open platform - (44) log processing of API services
My first experience of shadowless cloud computer
[JS -- map string]
I sorted out some basic questions about opencv AI kit.
Deeply understand the concepts of synchronization and asynchrony, blocking and non blocking, parallel and serial
Unit testing classic three questions: what, why, and how?