When trying to use the SQL Tuning Advisor from SQL Developer I get this error.

Tuning advisor was working some days before.

enter image description here

  • You get this no matter what the SQL? Have you tried a different user? Commented May 12, 2011 at 18:13
  • I tried this in different VMs and with different users. It works sometimes, but after analyzing some long query I get the problem.
    – bernd_k
    Commented May 13, 2011 at 5:10
  • 1
    Sounds like a job for Oracle Support Commented May 13, 2011 at 6:55

2 Answers 2


The solution is very simple. The string of the query is just too long.

I'm trying to optimize a stored procedure using dynamic sql with a parameter to decide if the sql is executed or output.

I just copied the output into a fresh sql developer pane and tried to use the tuning advisor.

The problem is that the generated output has a lot of trailing blanks, I just have to remove them.

  • How long is too long - are you hitting the 32K limit for Native Dynamic SQL? Commented May 16, 2011 at 11:23
  • The true sql statement is tuned to be less than 4000 char. It has to run on 10g. But printed to output and coped to a file it got 415 KB due to trailing blanks.
    – bernd_k
    Commented May 16, 2011 at 12:40
  • wow, that is a lot of blanks :) well spotted. Commented May 16, 2011 at 12:57

Try to switch your browser's language settings.

If the database is running with American/America, switch your browser to en-us. Then re-connect and run the task again.

This fixed up our SQL Tuning Advisor task which failed with the same error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.