In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "oracle dg switching operation example tutorial", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn the "oracle dg switching operation example tutorial"!
Background: disaster preparedness drills in response to disasters, failures and other cutoff situations, including master / standby switching and accidental host downtime.
1. Master / Slave switching (switch over)
#
# primary operation
#
1) confirm how the host is turned on
SQL > select DATABASE_ROLE,PROTECTION_MODE,open_mode from v$database
2) switch to standby mode
SQL > ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY
#
# standby operation
#
1) cancel the application of slave log
SQL > alter database recover managed standby database cancel
2) switch to host mode
SQL > ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
3) restart the slave library
SQL > SHUTDOWN IMMEDIATE
SQL > STARTUP
#
# primary operation
#
1) restart the main library
SQL > SHUTDOWN IMMEDIATE
SQL > STARTUP MOUNT
2) adjust to "READ ONLY" status
SQL > alter database open
3) Application log
SQL > alter database recover managed standby database using current logfile disconnect
4) confirm that open_mode is "READ ONLY WITH APPLY"
SQL > select open_mode from v$database
#
# test Test
#
Insert data on the original machine to test whether it is received by the original host.
2. Main library downtime (failover)
#
# primary operation
#
$ps-ef | grep pmon
$kill-9 {pid_pmon}
#
# standby operation
#
Cancel standby log application
Standby SQL > ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL
Standby SQL > alter database recover managed standby database finish
"if standby redolog is not applied, use the following command here:
Standby SQL > alter database recover managed standby database finish skip standby logfile
2) restart db to mount status
Standby SQL > shutdown immediate
Standby SQL > startup mount
3) switch to host mode
Standby SQL > alter database commit to switchover to primary
Standby SQL > alter database open
#
# test Test
#
Test whether the original machine can be connected and count the lost data.
If it is Oracle rac, you need to close a node during the switching operation. The method is the same.
At this point, I believe that everyone on the "oracle dg switching operation sample tutorial" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.