In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Use the SYNC mode of the LGWR process
1) the Redo logs generated by Primary Database should be written to both the log file and the network. That is to say, when the LGWR process writes the log to the local log file, it also sends the log to the local LNSn process (Network Server Process), and then the LNSn (LGWR Network Server process) process sends the log to the remote destination through the network. Each remote destination corresponds to a LNS process, and multiple LNS processes can work in parallel.
2) the LGWR must wait for the local log file operation and the network transfer through the LNSn process to succeed before the transaction on the Primary Database can be committed, which is what SYNC means.
3) the RFS process of Standby Database writes the received log to the Standby Redo Log log.
4) the log switch of Primary Database will also trigger the log switch on Standby Database, that is, the archive of Standby Redo Log by Standby Database, and then trigger the MRP or LSP process of Standby Database to recover archived logs.
Because the Redo of Primary Database is delivered in real time, the Standby Database side can use two recovery methods:
Real-time recovery (Real-Time Apply): as soon as RFS writes the log to Standby Redo Log, it will recover immediately.
Archive recovery: the restore is triggered only after archiving the Standby Redo Log is completed.
Primary Database uses the ARCH process by default, and must be explicitly specified if the LGWR process is used. When using the LGWR SYNC method, you can also use the NET_TIMEOUT parameter, which is in seconds, which means that if the network sends no response within how long, the LGWR process will throw an error. Examples are as follows:
Alter system set log_archive_dest_2 = 'SERVICE=ST LGWR SYNC NET_TIMEOUT=30' scope=both
Use the ASYNC mode of the LGWR process
The possible problem with using the LGWR SYNC method is that if the log fails to be sent to the Standby Database process, the LGWR process will report an error. In other words, the LGWR process of Primary Database depends on the state of the network, and sometimes this requirement may be too demanding, so you can use the LGWR ASYNC approach. Its working mechanism is as follows:
1) after the Redo log is generated at the Primary Database end, LGWR submits the log to both the log file and the local LNS process, but the LGWR process only needs to write to the log file successfully and does not have to wait for the network transmission of the LNSn process to succeed.
2) the LNSn process asynchronously sends the log contents to Standby Database. Multiple LNSn processes can be sent concurrently.
3) Log Switch occurs when the Online Redo Log of Primary Database is full, triggering the archiving operation, and also triggering the archiving of Standby Database to Standby Redo Log by Standby Database, and then triggering the MRP or LSP process to recover the archived log.
Because the LGWR process does not wait for the response from the LNSn process, the NET_TIMEOUT parameter is not required when configuring the LGWR ASYNC mode. Examples are as follows:
Alter system set log_archive_dest_2 = 'SERVICE=ST LGWR ASYNC' scope=both
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.