Problem with RAC (11g) and "ALTER SESSION"
I've just began using oraclepool in an internal production site, and am receiving the following error about 2 or 3 times per day.
Exception: ORA-25408: can not safely replay call due to query:ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF'
The above is run so that django doesn't have to pass a format string in for each date/datetime/timestamp query. During a RAC cutover, the above error message is displayed.
http://docs.oracle.com/cd/E11882_01/appdev.112/e10764/performance.htm describes why this happens. Basically, a SET SESSION (obviously) doesn't persist through a switch.
The fix should be to detect the error message, and replay the ALTER SESSION.
Are you running a RAC environment, and have you seen this before? If you don't have access to RAC, I can probably fork/change/test, so let me know.