1

This is ASP.NET application and it is using Oracle package which has global const variable. After this package is complied, first ASP.NET request gets this exception: ORA-04068. I read that it is because of this global const variable.

Please let me know if there is a way to avoid this exception on first request (in PROD environment)?

Thank you

user1663715
  • 396
  • 1
  • 4
  • 19

2 Answers2

4

If you have a PL/SQL package, that doesn't just contain executable code but includes global variables as well (constant or modifiable), all database sessions / connections that have used the package before the compile and access it after the compile, will receive the ORA-04068 error.

It doesn't happen to new session. So one approach to avoid it is to refresh all database connections, e.g. by recycling the IIS app pool.

Torino
  • 588
  • 2
  • 9
3

Make sure you compile the specification even though there are no changes.

sunil
  • 5,078
  • 6
  • 28
  • 33