The longer Autonomous Data Guard is available, the better it gets and the better it gets, the more questions come up.
Some question which hits my mailbox regularly is:
This autonomous Data Guard on ADB-S, when you move it to the other side what do we need to change in our connect string.
Well, the answer is simple: You do not need to change anything.
How does that work?
In my earlier post on how to enable Autonomous Data Guard, I have explained on how easy it is to get started with it and we will use this same setup to take it a step further.
The first step is to make sure that Autonomous Data Guard is enabled on your ADB-S database. You see this in the browser:
So it is enabled and available.
In order to connect to an autonomous database, you need a wallet zipfile.
If you wonder how I got it. When you browse to the database you see a button “DB Connection” and that brings up following window
Then you can click the “Download Wallet” button and save it locally to get started.
So I have downloaded this wallet in my Local folder:
mbp-pvanpuym:~ pietervanpuymbroeck$ ls -l Wallet_ADBDemo.zip
-rw-r--r--@ 1 pietervanpuymbroeck staff 20544 Sep 21 22:04 Wallet_ADBDemo.zip
In order to use it we need to understand how it works. So lets see what is inside by unzipping it
mbp-pvanpuym:~ pietervanpuymbroeck$ unzip Wallet_ADBDemo.zip
For security reasons (would be too much to obfuscate so it would be unreadable) I won’t paste the contents of the tnsnames.ora, but it will have only 3 entries, a high, low and medium one. That’s it. Nothing more.
To demonstrate how it works, we will use Swingbench. As you know you can create xml files to start with and I have copied SOE_Server_Side_V2.xml to ADBDemo_audg.xml.
The connection part I have modified it to connect to my ADB-S instance:
<DriverType>Oracle jdbc Driver</DriverType>
where you change xxx_service_name_xxx with the tnsnames.ora entry you found, in my case this is adbdemo_high and xxx_hostname_xxx with the hostname you have found in the same connect string. Keep the port 6200.
Then you can swingbench as follows:
mbp-pvanpuym:bin pietervanpuymbroeck$ ./swingbench -c ../configs/ADBDemo_audg.xml -cf /here/goes/the/path/to/Wallet_ADBDemo.zip
Application : Swingbench
Author : Dominic Giles
Version : 220.127.116.117
and Swingbench pops up:
When you then do the magical test, with running the workload, and do the switchover during the gui, then you will notice that NO changes are needed for letting the workload continue on the autonomous standby.
As always, questions, remarks?
Find me on twitter @vanpupi