Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Setting NLS_DATE_FORMAT using JDBC thin driver

822 views
Skip to first unread message

Andre van Winssen

unread,
Feb 19, 2002, 5:21:33 PM2/19/02
to
.
I want to make sure that NLS_DATE_FORMAT is set to "yyyy-mm-dd hh24:mi:ss"
whenever a thin JDBC client session executes DML.
At first I thought that an ON LOGON database trigger could do
this for me, but the doc. sais that SQL fired in a database event
trigger is executed in an autonomous transaction, so it won't
help me much.
I also don't want to execute the "alter session set nls_date_format.."
prior to each time I execute my application sql statement because of the
overhead involved. I know that my session is pooled (by websphere
in this case), which means that it would be sufficient to set
the NLS variable to the required value at session creation time as
the SID and SERIAL# will not change (unless the pooled connection
gets a timeout or something).
Is there any way, besides client side programming, to accomplish this?
Note that the JDBC thin client doesn't check client side environment
variables, like NLS_DATE_FORMAT in the registry or as a UNIX env.
variable.

Any hints appreciated.

Best regards,
Andre van Winssen

Ganesh Raja

unread,
Feb 20, 2002, 4:08:09 AM2/20/02
to
Use the Logon Trigger it does not matter if it is executed in a autonoums trans
or not ...

Since ur setting it for the session it will be active till the session logsoff
the system.

HTH

[Additions and Corrections Always Welcome.]
Best Regards,
Ganesh R

Andre van Winssen (andrew)

unread,
Feb 20, 2002, 11:09:48 AM2/20/02
to
you are right. I already had the trigger defined on schema level and
I tested it and it seemed to work.

But then there was the coincidence of me reading the doc about logon
triggers (misunderstanding
the autonomous transaction as being a separate session) and one of the java
developers
complaining about an ORA-1830.

Thanks again for the input.

Regards,

Andre van Winssen

"Ganesh Raja" <gan...@gtfs-gulf.com> wrote in message
news:5hp67u85s24mqcnle...@4ax.com...

0 new messages