What are the HADR Tools?

The HADR Simulator is used to look both at disk speed and network details around HADR. It can be used in several different ways, including helping you to troubleshoot the way HADR does name resolution.

The DB2 Log Scanner is used to look at log files and report details about your DB2 Workload. The output is a bit cryptic, and this tool is best used in conjunction with the HADR Calculator. This does require real log files from a real workload, so if you’re setting up a new system, you will need to have actual work on the system before you can use it. Also, IBM will not provide the tool they use internally to uncompress automatically compressed log files, so if you want to use it, you’ll have to turn automatic log compression off. I tried to get the tool, they would not give it to me.

The HADR Calculator takes input from the DB2 Log Scanner, and values that you can compute using the HADR Simulator, and tells you which HADR SYNCMODEs make the most sense for you.

These three tools do NOT require that you have DB2 on a server to run – they are fully standalone. There are versions of the first two for each operating system. The third requires that you have perl, but can be run anywhere, including on a laptop or personal computer. This allows you flexibility in considering details of a network or server you are thinking of using before actually using it. And allows you to analyze log files without adding workload to a server.

Using the HADR Calculator

The HADR Calculator requires you to pull four values from the HADR Simulator output and to give it the filename from the db2logscan output.

Getting the Disk Numbers

It’s actually easiest to run the HADR simulator separately to get the disk values using two separate commands:

Now the output using my actual values isn’t actually all that useful because in the case of the database I’m analyzing, there would be no predicted slowdowns caused by HADR. So to show you what it looks like, here is the output if I mess with the input values some to the point it would cause problems:

See the question marks (I’ve added the red color) in a few of the lines? That’s really what you’re looking for in this output. A varying number of question marks will be added to lines (portions of log files) where the specified syncmode might cause some performance impact. One question mark is mild impact, two question marks is moderate performance improvement, and three question marks is severe performance impact. If you see three question marks in a real world scenario, consider the fact that you should not use that syncmode, or if there is a requirement for the syncmode that you must somehow change one of the inputs – the disk speed, the network speed, or the transactional activity.

Ember is always curious and thrives on change. Working in IT provides a lot of that change, but after 17 years developing a top-level expertise on Db2 for mid-range servers and more than 7 years blogging about it, Ember is hungry for new challenges and looks to expand her skill set to the Data Engineering role for Data Science. With in-depth SQL and RDBMS knowledge, Ember shares both posts about her core skill set and her journey into Data Science.
Ember lives in Denver and work from home for XTIVIA, leading a team of Db2 DBAs.

4 comments

We turned automatic log compression off.too. If you ever need to do something with a database and archive log files and you have the log files compressed, you are out of luck. We discovered that in a production environment and found it just silly that the vendor wanted us to transmit our log files to them, have them uncompress them and send them back at 2 AM in the morning with no promise as to how many of these we would have to work through manually like this before getting the production environment back online and working. If the vendor wants to hold on to control of when this program is used they can simply use the same approach they use with db2cleancat. Have a new version for each new version of the database and have a 7 day password that you can only get by opening a PMR. Run the program, give it the valid password and uncompress your archive log files so you can use them the way you need to use them in an emergency situation. Otherwise, suffer through a restore of a backup and a partial roll forward if logs backed with that are corrupted too and then suffer through applications playing catch up while your CIO and CEO ask the question, and why do we have you people working for us? Vendors need to get some field experience and then they would understand more about their customers needs.