Home » Server Options » RAC & Failsafe » Problems with package variables and RAC
Problems with package variables and RAC [message #285760] Wed, 05 December 2007 08:42
Richard Plummer
Messages: 1
Registered: December 2007
Junior Member
I have been having some problems with some packages i have been playing around with and was hoping someone might be able to help me out.

Basically, we have a package (we'll call it package A) which goes off and calculates a price for a product, currently on an 8i database, which is called by a webpage and returns a price. Package A retrieves the data it needs and does any necessary formatting, and then calls Package B, which actually does the calculations. Package B then passes the price back to package A, which sets up some records on the database and spits out the price to the webpage. Currently this is done by passing a load of parameters between procedures.

I have made some changes to the packages so that in the specification of package A a load of global variables are declared. These are then populated at the beginning of the main procedure in package A and accessed in package B. This all works fine on our development 8i database.

The complication comes in that we are in the process of testing a migration to a 10g based RAC setup with 2 database instances. I decided to test out my code to make sure it worked on the new setup befoore going too much further into development, and lo and behold, it all goes horribly wrong. And i'm at a loss as to what is happening. From what i can tell from tracing out what the packages are doing, the procedures seem to be swapping between the two instances at will, and thus session data is being corrupted as half the processing that is supposed to happen to it within package B is not happening. An example of this is something similar to thus:

trace(sessionvar_1);

if v_var1 > 0 then

procedure1;

end if;

trace(sessionsvar_1);

Now, i know that v_var1 = 0, so procedure1 is not being called. The first trace of sessionvar_1 is 0, the second is something around 715.25 - yet no changes to the value have happened within the code.

So really i was hoping someone might have come across this sort of thing before, or has any idea what might be going wrong, or whether it's just a case that this way of carrying data within a session will not work in a RAC setup. I have spent ages scouring google and various sites/forums looking for an answer with no luck.

Regards,

Richard
Previous Topic: ownership of ocr and voting disk files
Next Topic: error creating db - ORA-12720: operation requires database is in EXCLUSIVE mode
Goto Forum:
  


Current Time: Fri Mar 29 08:22:54 CDT 2024