Cheching a V12.0.1 GA reload file, I've stumbled over the following definition for a proxy procedure:
The reload file used to migrate this database from V11.0.1 to V12.0.1 does not have the "dynamic result sets 1" clause, nor does the original definition (as this is an undocumented clause, AFAIK).
The proc does indeed return one result set - but how does the local database know about that?
asked 21 Mar '11, 13:20
This clause is meaningless in all instances except in the case of external environment calls. For example, if you are using the JAVA external environment, and if your JAVA signature has "[Ljava/sql/ResultSet;" as the last argument, then the server needs to know ahead of time exactly how many result sets will be returned in the ResultSet array. Using something like "dynamic result sets 3" tells the server that this particular JAVA external environment call will return exactly 3 result sets. The reason the server needs to know in the case of external environments is due to the fact that the "server" pre-allocates the ResultSet array prior to calling the user method.
For remote procedure calls, the server is perfectly capable of handling dynamic multiple result sets coming back from the remote server without needing to know ahead of time how many result sets are actually going to come back. Hence, dbunload is incorrect in adding the dynamic result set clause for remote procedure definitions; but as I indicated above, there is no problem in such cases since the clause is happily ignored for all instances except external environment procedures. I will still mark this problem as a dbunload bug and will get the issue resolved. I will also have a chat with the documentation group to see if we can make the documentation a bit more clear regarding the dynamic result set clause.
answered 21 Mar '11, 15:06