Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
You get this no matter what the SQL? Have you tried a different user? – Jack Douglas May 12 '11 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 May 13 '11 at 5:10
Sounds like a job for Oracle Support – Jack Douglas May 13 '11 at 6:55
up vote 4 down vote accepted

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.

share|improve this answer
How long is too long - are you hitting the 32K limit for Native Dynamic SQL? – Jack Douglas May 16 '11 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 May 16 '11 at 12:40
wow, that is a lot of blanks :) well spotted. – Jack Douglas May 16 '11 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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