In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Oracle 11g dg broker how to automatically failover", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Oracle 11g dg broker how to automatically failover" this article.
Oracle 11g dg broker automatic failover verification:
Db2 main library:
SQL > select DATABASE_ROLE,OPEN_MODE from v$database
DATABASE_ROLE OPEN_MODE
--
PRIMARY READ WRITE
Db1 is standby
SQL > select DATABASE_ROLE,OPEN_MODE from v$database
DATABASE_ROLE OPEN_MODE
--
PHYSICAL STANDBY READ ONLY WITH APPLY
Abnormal shutdown of db2 main library simulation
SQL > shu abort
ORACLE instance shut down.
Check the status of db1 again:
SQL > select DATABASE_ROLE,OPEN_MODE from v$database
DATABASE_ROLE OPEN_MODE
--
PRIMARY READ WRITE
Fourth: the process of automatic switching:
4.1Tests take about 10 seconds for observer to detect a failure in the main database!
DGMGRL > start observer
Observer started
20:15:59.44 Thursday, July 04, 2019
Initiating Fast-Start Failover to database "db2"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "db2"
20:16:01.77 Thursday, July 04, 2019
4.2 the process of failover is the same as manual failover, whether it is automatic failver or manual execution of FAILOVER TO, the following two commands are executed using the command line failover:
Alter database recover managed standby database finish force;--- stops the rfs process
Alter database commit to switchover to primary;--- from open to mount
Alter database open;-read write to open
When failover occurs, you can see that this is indeed the process as follows
1)。 Start status: both rfs and mrp processes are normal
SQL > select process,status, sequence# from v$managed_standby
PROCESS STATUS SEQUENCE#
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CLOSING 14
RFS IDLE 0
RFS IDLE 15
RFS IDLE 0
MRP0 APPLYING_LOG 15
8 rows selected.
2) .rsf process disappears
SQL > select process,status, sequence# from v$managed_standby
PROCESS STATUS SEQUENCE#
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CLOSING 14
MRP0 APPLYING_LOG 15
3)。 The database becomes mounted.
SQL > select DATABASE_ROLE,OPEN_MODE from v$database
DATABASE_ROLE OPEN_MODE
--
PHYSICAL STANDBY MOUNTED
4) the database has become open write
SQL > select DATABASE_ROLE,OPEN_MODE from v$database
DATABASE_ROLE OPEN_MODE
--
PRIMARY READ WRITE
4.3execute failover manually
DGMGRL > help failover
Changes a standby database to be the primary database
Syntax:
FAILOVER TO [IMMEDIATE]
After the occurrence of failover:
Check the status of configuration: find the original master library needs to be reinstated, which needs to be repaired with the REINSTATE command before it can become the slave library of the new master library!
DGMGRL > show configuration
Configuration-dbha_c
Protection Mode: MaxPerformance
Databases:
Db2-Primary database
Warning: ORA-16829: fast-start failover configuration is lagging
Db1-(*) Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
First, start the original main library to the mount state:
SQL > startup mount
DGMGRL > help reinstate
Changes a database marked for reinstatement into a viable standby
Syntax:
REINSTATE DATABASE
DGMGRL > REINSTATE DATABASE db1
Reinstating database "db1", please wait...
Reinstatement of database "db1" succeeded
Check the original main library again:
SQL > select process,status, sequence# from v$managed_standby
PROCESS STATUS SEQUENCE#
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CONNECTED 0
ARCH CLOSING 5
RFS IDLE 0
RFS IDLE 0
RFS IDLE 0
RFS IDLE 6
MRP0 APPLYING_LOG 6
In fact, reinstate performs the following process:
If you want to convert the original primary library to a new standby library
It is required that the original main library must have the function of flashbackup database turned on, after failover
1. Check the scn number when the slave failover becomes the master.
SQL > select STANDBY_BECAME_PRIMARY_SCN from v$database
STANDBY_BECAME_PRIMARY_SCN
-
15468
two。 Flash back the original main library to the scn number of 15468
SQL > FLASHBACK DATABASE TO SCN 15468
Database altered.
3. Perform the switch in the original main library:
SQL > alter database convert to physical standby
Database altered.
4. Close the original main library
SQL > shu immediate
5. Open the original main library to mount state
SQL > startup mount
6. Archive the newly generated logs to the new backup database on the new main database
SQL > alter system archive log current
7. Open the mrp process application log and repeat the changes
SQL > alter database recover managed standby database using current logfile disconnect from session
Database altered.
5. View status:
SQL > select process,status from v$managed_standby
PROCESS STATUS
--
ARCH CLOSING
ARCH CONNECTED
ARCH CONNECTED
ARCH CLOSING
MRP0 APPLYING_LOG
RFS IDLE
RFS IDLE
RFS IDLE
At this point, the original master library has become the new master standby.
The above is all the contents of the article "how to automatically failover Oracle 11g dg broker". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.