Tell me more ×
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. It's 100% free, no registration required.

After an update from ASA9 to SA12, there seems to be a problem with several procedures. This occurs only if the user does not have DBA authority. In ASA9 everything worked fine.

SELECT * FROM UDP_ErmittleOffeneSaldenAuslagen('', '');

Brings up the following error:

Could not execute statement. The optimizer was unable to construct a valid access plan SQLCODE=-727, ODBC 3 State="HY000" Line 1, column 1

But if I use the following statement, it works flawlessly:

CALL UDP_ErmittleOffeneSaldenAuslagen('', '');

The problem is, that I need the SELECT statement. The procedure itself looks (for example) like this:

CREATE PROCEDURE "FCAdmin"."UDP_ErmittleOffeneSaldenAuslagen"() 
BEGIN
  SELECT * FROM Akte
END

It looks like the error comes up if a specific table is used inside the procedure. If I use another table instead of "Akte" in the procedure's select statement, it works. Also executing the statement

SELECT * FROM Akte

itself works.

Any clues?

share|improve this question

migrated from stackoverflow.com Nov 9 '12 at 9:04

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.