12c Upgrade Bug with SQL Tuning Advisor

By | In Oracle | March 22nd, 2017

Recently, after an upgrade from 11.2 to 12.1, we ran across some performance problems. Eventually we found that the SQL Tuning Advisor was missing. The cause was BUG 20540751.

Oracle offers both a patch and a work around. If you find this as part of your upgrade testing, before your production upgrade, the patch number is 20540751 and it can be applied as part of your upgrade outage window. If you are seeing performance problems after an upgrade, check for this bug by running the SQL below and apply the work around.

There is nothing in the upgrade log to let you know you have hit this bug, and it’s not clear what causes it to appear. It wouldn’t hurt to add a step to your post upgrade checklist to make sure the SQL Tuning Advisor job still exists.

Per ORACLE:

Bug  20540751 – AUTO TASK SQL TUNING ADVISOR ENABLED BUT PROGRAM NOT RUNNING AFTER 12C UPGRADE. This affects versions 12.1.0.1 and 12.1.0.2.

If you have recently upgraded and are experiencing performance problems check to see if your SQL Tuning Advisor job is missing by running this:

If you see “no rows selected” then you have hit this bug.

The workaround from Oracle is to run

to create the scheduler program that was dropped.

See Oracle Support Note: Doc ID 2171154.1 for more info, go to https://support.oracle.com/

Did that work for you? Let us know in the comments below.

For additional resources please see our white paper, Upgrading to Oracle 12c

Datavail Script: Terms & Conditions

By using this software script (“Script”), you are agreeing to the following terms and condition, as a legally enforceable contract, with Datavail Corporation (“Datavail”). If you do not agree with these terms, do not download or otherwise use the Script. You (which includes any entity whom you represent or for whom you use the Script) and Datavail agree as follows:

1. CONSIDERATION. As you are aware, you did not pay a fee to Datavail for the license to the Script. Consequently, your consideration for use of the Script is your agreement to these terms, including the various waivers, releases and limitations of your rights and Datavail’s liabilities, as setforth herein.

2. LICENSE. Subject to the terms herein, the Script is provided to you as a non-exclusive, revocable license to use internally and not to transfer, sub-license, copy, or create derivative works from the Script, not to use the Script in a service bureau and not to disclose the Script to any third parties. No title or other ownership of the Script (or intellectual property rights therein) is assigned to you.

3. USE AT YOUR OWN RISK; DISCLAIMER OF WARRANTIES. You agree that your use of the Script and any impacts on your software, databases, systems, networks or other property or services are solely and exclusively at your own risk. Datavail does not make any warranties, and hereby expressly disclaims any and all warranties, implied or express, including without limitation, the following: (1) performance of or results from the Script, (2) compatibility with any other software or hardware, (3) non-infringement or violation of third party’s intellectual property or other property rights, (4) fitness for a particular purpose, or (5) merchantability.

4. LIMITATION ON LIABILITY; RELEASE. DATAVAIL SHALL HAVE NO, AND YOU WAIVE ANY, LIABILITY OR DAMAGES UNDER THIS AGREEMENT.

You hereby release Datavail from any claims, causes of action, losses, damages, costs and expenses resulting from your downloading or other use of the Script.

5. AGREEMENT. These terms and conditions constitute your complete and exclusive legal agreement between you and Datavail.

 

 

Contact Us
Megan Elphingstone
Senior Oracle Database Administrator
Megan has been working with Oracle databases for over 15 years, including 10 years as an Oracle Database Administrator. Megan has supported over 200 production databases - performing upgrades, infrastructure moves to the cloud, tuning, performance testing, implementing high availability solutions, including moves to ASM, Data Guard, RAC, and Golden Gate. Megan’s favorite part of being a DBA is helping customers and users solve problems and implementing solutions that are automated, stable, and reliable. When she isn’t working, Megan is biking or snowboarding with her family.

Leave a Reply

Your email address will not be published.
Required fields are marked (*).