0

I am a sql/plsql developer. I made some changes in the package in the production server and when it is used by the application side they are getting the package got invalidated. As I have made changes to the environment, the state of package is changed so when I compile it again, those changes are not reflected back by the application side, as they are constantly maintaining the session. So I have to make the changes and restart the application server so that when they make the connection again with the oracle it inherits all the changes. But it is not feasible. Can some please help me resolve this issue?

user272735
  • 10,473
  • 9
  • 65
  • 96
  • 1
    Is the application saying the package is invalid, or that existing package state has been discarded/package body x has been invalidated/could not find program unit being called? Hopefully the latter, which would imply that your [package is stateful](http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/packages.htm#LNPLS804). You didn't see the same issue in dev/test environments before rolling this change out to production? – Alex Poole Jan 08 '14 at 17:55
  • Sort of a duplicate of [this question](http://stackoverflow.com/q/19376440/266304); the context is different but it boils down to the same thing, 'how do I stop this happening', and the answer is going to be pretty much the same I think. [There are other related questions too](http://stackoverflow.com/search?tab=newest&q=package%20state%20discarded%20%5boracle%5d). – Alex Poole Jan 08 '14 at 18:14
  • 2
    Are you making changes to the package itself, or to some other dependent objects? Also, if this is a production environment, don't you have scheduled (controlled) release windows for changes? – tbone Jan 08 '14 at 18:28
  • If you recompile a package which is in use by existing sessions the package will be invalid from the point of view of those sessions and they will be unable to continue. That's a fundamental limit of Oracle - those apps will have to disconnect from the database and reconnect - there is no other way to do it. In future, try to schedule production builds for times when the packages in question are not in use. – Bob Jarvis - Слава Україні Jan 11 '14 at 02:30
  • @tbone: many years ago, when I were but a lad, I learned an important lesson by careful observation of my old, grizzled mentor: Real Programmers don't use controlled release procedures - they log on as root and compile what they like! Too bad about him deleting the entire accounting system. I should look him up - I always wondered how he did after he got out of prison... – Bob Jarvis - Слава Україні Jan 11 '14 at 02:39
  • @BobJarvis lol! Sounds like a story for thedailywtf.com – tbone Jan 11 '14 at 02:43
  • Thanks got the problem solved ..it was just in a testing env. that is going to be svheduled in production . was facing some difficulty . Thanks all for the help – user3174410 Feb 10 '14 at 17:15

0 Answers0