0

Could you advise why on one of our database below query:

select ' ' from dual

returns 32 blank characters:

'                                '

This happens ONLY on one environment, all other databases returns correctly only one space. I checked nls_parameters, they are the same. Any idea what could be reason for that? Some DB parameter? Some patch was not applied on that instance?

Other example:

select "!" || "!" from dual

produces:

"!!                                                              "

so it's !! + 62 spaces

1 Answer 1

2

Check database parameter cursor_sharing. What is it set to? Set it to EXACT.

SQL> show parameters cursor_sharing

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------
cursor_sharing                       string      EXACT
SQL>
Sign up to request clarification or add additional context in comments.

2 Comments

value was set to FORCE, when I changed it on session level, then it works fine. However, I can't reproduce this issue on other environments by setting this value to FORCE - is it possible to do this?
Check here for explanation and reproducible example. Note also that changing cursor_sharing can have side effects on other statements...

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.