In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to rebuild the database online after the dm8 read-write separation database is abnormal. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
When checking that the application reported an error exception today. Monitor cluster logs and monitors find anomalies
The test environment scenario is as follows:
Main library log
Prepare the library
The library archives are all empty.
It has been verified that it is caused by deployment problems. The latest version of the dm8 documentation mentions the way that cluster deployment does not support copying data files. Although it can be deployed, the master and standby will not be synchronized. Because each library has a database magic number (DB_MAGIC), each time after a restore and restore operation, the DB_MAGIC will change, so it is necessary to distinguish different libraries in the same data daemon environment.
Resolve:
Online backup of the main library, rman in the offline standby machine for recovery, standby machine reconstruction.
1. 1. Online backup of the main library
SQL > BACKUP DATABASE BACKUPSET'/ dm/data/BACKUP_FILE_01'
Note: if when performing a backup, the library to be backed up is in Normal mode, and it is not sure that this library must be used as the main library, then offline backup must be used for Normal mode libraries, not online backup. Because this is a reserve database reconstruction, so use online backup directly.
two。 Copy the backup file to the machine where the repository is located
3. Perform offline database restore and recovery directly on the original library
. / dmrman CTLSTMT= "RESTORE DATABASE'/ dm/data/DAMENG/dm.ini' FROM BACKUPSET'/ dm/data/BACKUP_FILE_01'"
. / dmrman CTLSTMT= "RECOVER DATABASE'/ dm/data/DAMENG/dm.ini' FROM BACKUPSET
'/ dm/data/BACKUP_FILE_01' "
. / dmrman CTLSTMT= "RECOVER DATABASE'/ dm/data/DAMENG/dm.ini' UPDATE DB_MAGIC"
4. Reconfigure B's dm.ini, dmmal.ini, dmarch.ini, and dmwatcher.ini configuration files.
5. Start B in Mount mode
. / dmserver / dm/data/DAMENG/dm.ini mount
6. Log in to B with DIsql, set OGUID, and modify the standby mode.
SQL > SP_SET_PARA_VALUE (1, 'ALTER_MODE_STATUS', 1)
SQL > sp_set_oguid (453332)
SQL > alter database standby
SQL > SP_SET_PARA_VALUE (1, 'ALTER_MODE_STATUS', 0)
7. Start the daemon of B
. / dmwatcher / dm/data/DAMENG/dmwatcher.ini
After performing the above steps, the preparation process for recovery B has been completed. Next, the data daemon system will rejoin the data daemon system B as a backup database, and the daemon of A will automatically notify the synchronous data to B, and finally restore the master and standby database data to a consistent state.
Log in to the monitor to check the health status of the cluster:
Everything's fine. Cluster repair completed.
The above content is how to rebuild the database online after the exception of dm8 read-write separation repository. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.