Helena Marková, October 19, 2004 - 4:03 am UTC
Windows & NLS_ Registry settings.
Cloink, March 08, 2007 - 12:19 pm UTC
Hi Tom,
I'm curious to know why XE (but presumably any standard Ora install) puts an NLS_LANG setting into the Windows registry. As far as I'm aware, I installed only the server, certainly I have no Windows-sqlplus (just the DOS-sqlplus).
My PC is acting as both server and client, connecting via Perl or DOS-sqlplus. Perl picks up the registry setting, as does sqlplus. That's maddening! If this PC was a server proper, the registry would be overriding the database SYSTEM settings.
I want queries to return dates in standard ANSI SQL format (surely a common thing) to any queries exec'd by the Perl scripts; I don't want to have to issue
ALTER SESSION SET NLS_DATE_FORMAT...
every time there's a connection to the db, I'm writing software to go on the web and that would add unnecessary overhead on the server.
I've removed (renamed) the NLS_LANG registry setting. Is this going to cause problems elsewhere? Should I add an NLS_DATE_FORMAT registry entry intead?
Thanks,
Clark.
March 08, 2007 - 12:47 pm UTC
the XE install installed the client and the server software. the client software sets that registry setting.
either of what you propose would work.
Setting NLS parameters in WEB applications
Shimon B, March 15, 2007 - 1:01 pm UTC
Hi tom,
If you find my review that it is "actually new question..."(as you mentioned in the fair warning), please accept my appology, and do not bother to read further - only notify me via my email address i've atached, and I will try to submit a new question.
As to the subject matter, in the company where I am assigned now, we have upgraded our application from a C/S model into a Oracle Ias-10g model (Old : Oracle Forms version 5.0 . New : IDS 10g). In some of the application modules there is an explicit use of "alter session" to set the NLS_DATE_FORMAT to a different format('DD-MON-YYYY') than the default('DD-MON-RR'). This worke dfine in the C/S environment, but in the new model, the client is actually the IAS.
my question : How can one override the default nls_date_format, so that it will effect only the current session, since the alter session affects only the direct client - which in this case is not the Forms module.
Thanks in advance.
Shimon B.
March 15, 2007 - 1:07 pm UTC
not sure I'm following you - the alter session set nls_date_format should work just the same in web forms as it did in client server.
Shimon Batashvili, March 21, 2007 - 1:20 pm UTC
Hi Tom,
Thanks for the short-time reply.
It apparantly does not behave the same as before, because the application itself has no effect on these settings anymore. I've printed the value of sysdate before setting the format via SRW.DO_SQL('alter session....'), and after the setting, but the value presented has been tha same as it was without changing the format - i.e., "20-MAR-07" (the same as the default format,"dd-mon-rr"), instead of "20-MAR-2007".
The error I get when the report fails is as follows :
"
REP-1401: Invalid date mask. ORA-01843: not a valid month REP-1401: 'cf_charged_duration_41': Fatal PL/SQL error occurred.
"
Thank again,
Shimon B.