Problem with null NLS_DATE_FORMAT in NLS_INSTANCE_PARAMETERS table
494531Apr 14 2006 — edited May 18 2006We are on Oracle 10g running a web application through J2EE. Other day application haleted as it had too many cursors/sessions open. I querieed the v$session, V$sqlarea and V$Active_Session_History to see what happened and found the following.
The query on V$Active_Session_History returns around 1000 rows.
SELECT * FROM V$ACTIVE_SESSION_HISTORY WHERE EVENT='SQL*Net message to client'
For all these sessions the Program/Module says as 'JDBC Thin Client' and with a status of 'WAITING' or 'INACTIVE' and here is the SQL that all these sessions are running internally.
SELECT VALUE FROM NLS_INSTANCE_PARAMETERS WHERE PARAMETER ='NLS_DATE_FORMAT'
And here is how nls_date_format defined in database.
SELECT * FROM NLS_INSTANCE_PARAMETERS WHERE PARAMETER ='NLS_DATE_FORMAT' return null.
SELECT * FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER ='NLS_DATE_FORMAT' - returns DD-MON-RR
SELECT * FROM NLS_SESSION_PARAMETERS WHERE PARAMETER ='NLS_DATE_FORMAT' - returns DD-Mon-RRRR
Here are my concerns
- Most of the date columns in the database are defined as 'TIMESTAMP'
- JBOSS - which maintains the JDBC connection seesm to be fine. I mean JDBC connections are getting closed (by looking at JBOSS admin screen) but it seems the db connections(sessions) are still open. Is that a true assumption based on the query return from V$ACTIVE_SESSION_HISTORY table. If so, how to resolve this issue.
- By changing the nls_date_format at instance level(thorugh init.ora or alter system) would solve the problem? If so, should I re-start the db, does the below command works even though the 'isinstance_modifiable' it set to 'FALSE' and do we need to set the nls_date_format in init.ora before we start the db or just give the below command which would update the init.ora
ALTER SYSTEM SET NLS_DATE_FORMAT = 'DD-MON-RRRR' SCOPE=SPFILE;
OR
Should we chane the data type to 'date' from 'timestamp' at application would solve the problem?
Your early response is really appreicated.
Thanks in advance.