In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about a sample analysis of the ADG session retention feature in Oracle 12c R2. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
A nice feature in Oracle 12c R2 is Active Data Guard session reservation, which was originally called Preserving Active Data Guard Application Connections
How to understand, such as the connection session on Active Data Guard, the session connection will always remain uninterrupted during the process of switchover. This sounds very characteristic, can improve the user experience, and is a relatively transparent way.
In the end, let's briefly test it. First, let's take a look at the ADG session by default. The switching process will be done directly using DG Broker.
This is a 12cR2 environment that also uses Far Sync.
DGMGRL > show configuration Configuration-dg_test12cs Protection Mode: MaxPerformance Members: test12cs-Primary database test_sync-Far sync instance test12css-Physical standby database Fast-Start Failover: DISABLED Configuration Status:
SUCCESS (status updated 10 seconds ago) We connect to the standby library, which is now in ADG mode.
SQL > select open_mode from vested database; OPEN_MODE--
READ ONLY WITH APPLY if at this time we use a statement to query on the slave side, use TNS connection, and then DG Broker to switch, the switch is as follows.
DGMGRL > switchover to test12css Performing switchover NOW, please wait... Operation requires a connection to database "test12css" Connecting... Connected to "test12css" Connected as SYSDBA. New primary database "test12css" is opening... Operation requires start up of instance "test12cs" on database "test12cs" Starting instance "test12cs"... For RDBMS instance ORACLE instance started. Database mounted. Database opened. Connected to "test12cs" Switchover succeeded, new primary is "test12css" DGMGRL >
Repeated tests of the connection on the client are as follows:
SQL > select count (*) from cat; COUNT (*)-153 SQL > / COUNT (*)-153 SQL > / select count (*) from cat * ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 94489 Session ID: 419 Serial number: 62932
You can see that during the switch, the connection is broken, and then the connection is completely disconnected.
SQL > / ERROR: ORA-03114: not connected to ORACLE
We need to talk about this feature here. In fact, it also involves a parameter standby_db_preserve_states, which defaults to NONE.
SQL > show parameter standby_db_preserve_states NAME TYPE VALUE-standby_db_preserve_states string NONE
We set it to ALL, and we need to restart the library for this modification. After we have set it up, we will do switchover.
The steps are similar to the above. Let's take a look at the effect directly. We always check the data query within this session. The whole process is relatively smooth. There will be a pause of about two seconds during the switching process, but the connection is always maintained.
COUNT (*)-153 SQL > / COUNT (*)-153
On the whole, this feature has indeed achieved the desired results, which is quite good.
Thank you for reading! This is the end of the article on "sample analysis of ADG session retention features in Oracle 12c R2". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.