Home » SQL & PL/SQL » SQL & PL/SQL » Question | nls_session_parameters (oracle 11.2g , plsql developer 8)
Question | nls_session_parameters [message #524752] Mon, 26 September 2011 09:16 Go to next message
Sarlula
Messages: 18
Registered: September 2010
Junior Member
Hello,

I just upgraded my version of my oracle from 9 to 11.2g.

When I tried to execute some queries in PL/SQL i keep getting an
annoying error :
"ORA-01843 not a valid month."


I realized that if I execute the following query:
alter session set NLS_DATE_LANGUAGE=AMERICAN;

before every query that I want to execute, then it's executed fine.

I preformed the next queries:
1.
 select * from nls_database_parameters;

2.
select * from nls_instance_parameters;

3.
select * from nls_session_parameters;


and I saw that the fields in the "nls_session_parameters" view
are not derived from "nls_database_parameters" \ "nls_instance_parameters".

How can I derive the parameters from the instance\database view into the session view?
I want that the "nls_date_language" parameter will always be 'AMERICAN'.

Can it be done?
Re: Question | nls_session_parameters [message #524754 is a reply to message #524752] Mon, 26 September 2011 09:31 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>annoying error :
while you may have found an viable work around,
consider modifying application code to make it independent of DB or session settings;
by using TO_CHAR() or TO_DATE() function as needed.
Re: Question | nls_session_parameters [message #524755 is a reply to message #524752] Mon, 26 September 2011 09:31 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Have you checked your client configuration?

MHE
Re: Question | nls_session_parameters [message #524758 is a reply to message #524752] Mon, 26 September 2011 10:14 Go to previous message
Michel Cadot
Messages: 68761
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
I want that the "nls_date_language" parameter will always be 'AMERICAN'.

Use a logon trigger to set it.

But the best solution is to NEVER rely on its value.

Regards
Michel

[Updated on: Mon, 26 September 2011 10:15]

Report message to a moderator

Previous Topic: connect 2 db schemes at the same time
Next Topic: oracle index
Goto Forum:
  


Current Time: Mon Jul 21 00:04:48 CDT 2025