Precompilers and OCI (MOSC)

MOSC Banner

Pro*C calling the wrong instance of a stored after change of current_schema 10.2.0.3 - why and how t

edited Sep 21, 2009 4:29PM in Precompilers and OCI (MOSC) 2 commentsAnswered
Does anyone have any idea about this problem I am having - I am wondering whether this could be a Pro*C statement caching issue.

I have a Pro*C program which decides at run time which schema's tables and procedures it should use. Once it has decided, it issues an "ALTER SESSION SET CURRENT_SCHEMA=xxxx" statement to change to the appropriate schema. It then calls C functions compiled in different files that issue queries and anonymous PL/SQL such as "begin :db_return := insert_order (:new_order_no);end;"

I am finding that sometimes the wrong schema's copy of the stored function is being called - the function raises an error because it can't find the right data and the ora-6502 traceback shows the wrong schema.  The immediately following function call (again compiled in its own source file) is usually calling the right schema's function, but failing because the first call failed.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center