Thursday, February 9, 2012

AWR and Oracle Licensing

Oracle 10g, 11g
When 10g came along, we thought we were getting some great new performance monitoring and tuning tools to help us diagnose problems and generally make sure our database was running smoothly. This seemed to come in the form of the Automatic Workload Repository (AWR). 

All sorts of articles were written about how you can use AWR to troubleshoot various performance problems that you may be having. Many forums and articles showed off how STATSPACK had been eclipsed by AWR, and countless more have written examples on how to use AWR. Testing Oracle 10g for the first time, I was really excited about AWR. 

"Look how easy it is! And it's installed and available by default!" 

Well, yes it is, but actually.... you're not allowed to use it! 
Yes, that's right. Even though:
  • it is part of the Oracle kernel of all editions (Standard One, Standard and Enterprise), 
  • and the AWR tables are installed by default, 
  • and statistics capturing is turned on by default, 
  • and there is absolutely nothing stopping you as DBA from accidentally or on purpose selecting from one of the DBA_HIST_* or V$ACTIVE_SESSION_HISTORY views
......... in terms of the licensing......... you're actually not allowed to use it.

Want proof?

I can't believe it has actually taken me this long to read anything to do with this particular licensing fact. But there it is. Oracle Diagnostic pack, of which AWR is a part, is only available to the Enterprise Edition of the Oracle database 10g and 11g, and only as an optional extra.

Even though the views are installed, and everything works as it should, and you don't get any, "you don't have this option installed" messages..... you are still not allowed to use it unless you have Enterprise Edition and you have bought the additional diagnostic and tuning packs.

In 11g, we start to see the first attempts by Oracle to block access to AWR. This comes in the form of the CONTROL_MANAGEMENT_PACK_ACCESS database parameter introduced in 11g. This parameter is set to NONE by default and will cause your AWR reports to error. See the related blog entry: AWR Report missing diagnostic information with ORA-20023 errors

Why did we all think we could use AWR in the first place?
It has actually taken me quite a while to work it out. I had to remember how it was that I came to know about AWR. And then it occurred to me.... it was the Oracle Database Concepts guide. The concept guide notes in the very first sentence under Automatic Workload Repository that:
Automatic Workload Repository (AWR) is a built-in repository in every Oracle Database.
That does not sound like "optional extra only available to Enterprise Edition versions" to me. And from there, we simply started looking for "how to" articles, none of which ever mention anything to do with licensing.

So in conclusion.... you are likely violating license agreements on a daily basis. That's the bad news. Go home tonight and say a few thousand Hail Mary's, or do whatever you do to feel better about yourself.

The good news is... you still have STATSPACK, which according to Tom Kyte is free, and still compatible with Oracle 10g, and most likely with 11g. Install that tomorrow and all will be good with the world.


Ranjit said...

Very useful article, thanks.

Unknown said...

I would like to point out that the CONTROL_MANAGEMENT_PACK_ACCESS database parameter is NOT set to NONE by default. According to Oracle Database Reference, it is set to DIAGNOSTIC+TUNING by default.

dayneo said...

Yes, the database reference notes that the default value for CONTROL_MANAGEMENT_PACK_ACCESS is in fact DIAGNOSTIC+TUNING.

However, my experience has been that if you install Oracle 11g standard edition, then this parameter is set to none. You then receive all sorts of errors when trying to access the AWR reports.
I cover this issue in my other blog post AWR Report missing diagnostic information with ORA-20023 errors. The point is, if you are using Oracle Standard edition, then you are not allowed to use this information anyway.