469,328 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

SQL0901N - Any comments?

DB2/SUN 8.1.6

I have a PROCEDURE that worked until i modified it by adding a FUNCTION
call in some of the queries. Then i started to get:

SQL0901N The SQL statement failed because of a non-severe system
error.
Subsequent SQL statements can be processed. (Reason
"sqlno_crule_save_plans [100]:rc( 0) ".)
SQLSTATE=58004

I was able to get this down to a small example:

CREATE FUNCTION A() RETURNS CHAR(1) BEGIN ATOMIC RETURN ''; END
DECLARE GLOBAL TEMPORARY TABLE A(A CHAR(1))

SELECT \
(SELECT 'A' FROM SESSION.A WHERE A() = '') \
FROM \
SESSION.A A1, \
SESSION.A A2 \
WHERE \
NOT EXISTS \
( \
SELECT \
* \
FROM \
SESSION.A A3 \
WHERE \
A() = '' \
AND A3.A = A1.A \
AND A3.A = A2.A \
)

DROP TABLE SESSION.A
DROP FUNCTION A

If i change anything, such as have the FUNCTION not use a block, or
change the WHERE clause it will work. Any comments?

B.

Nov 12 '05 #1
2 1768
Brian,

This appears to be a bug. You might want to quickly scan the DB2
service online problem database for any matching previously discovered
and fixed bugs. The url is:
http://www-306.ibm.com/software/data...ort/index.html, simply
type sqlno_crule_save_plans in the search box and see what comes up.
Scanning through the results briefly, it looks like your symptom could
be matching APAR IY73984.

Hope this helps,
Miro

Nov 12 '05 #2
Thanx, i didn't know of that. Hmm... to check that it looks like i need
a username and password for support. I doubt i have access to that
information.

I did ask the DBA to fill out an APAR, so hopefully they'll take a look
at that.

As for the problem right now, i found a workaround. The problem existed
in a PROCEDURE doing an INSERT that CALLed a FUNCTION. I was able to
rewrite the FUNCTION without a block by CALLing another FUNCTION with
no block twice inside a CASE statement. Now the PROCEDURE works without
error.

I just hope i don't have to change that again.

B.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Uwe Ziegenhagen | last post: by
4 posts views Thread by bikkaran | last post: by
2 posts views Thread by Boothby | last post: by
3 posts views Thread by Gregor Kovańć | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.