sesstion setting in an oracle script

I am using number of scripts that have  these three lines?
Any idea what they do or mean?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert GOracle dbaCommented:
well, yes, first, change your country settings for date, time, numeric characters

second is the language in which things are reported in

set define off is to disable the & substitutions

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geert GOracle dbaCommented:
you can see what happens when you run date statements:

19:51:43 >alter session set nls_territory = 'AMERICA';

Session altered.

19:51:46 >select sysdate from dual;


19:51:50 >alter session set nls_territory = 'FRANCE';

Session altered.

19:51:56 >select sysdate from dual;


19:51:58 >

Open in new window

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ALad2005Author Commented:
Thank you guys.
ALad2005Author Commented:
So Cool Geert Gruwez!!  Thank you for showing me that.   Now it makes sense!
for Language setting, I guess it works similar way but I need to use different sql statement to see the difference?
slightwv (䄆 Netminder) Commented:
There are typically examples in the docs as well.  In the link I posted:

See these examples of using the NLS_LANGUAGE parameter:
•For an example of setting NLS_LANGUAGE to Italian, see Oracle Database Globalization Support Guide.

•For an example of overriding default values for NLS_LANGUAGE and NLS_TERRITORY during a session, see Oracle Database Globalization Support Guide.

Which gets you here:
Geert GOracle dbaCommented:
If you want to see a language effect, just try an invalid statement.
The error will be given in the language you set.

select silly from samples

Open in new window

slightwv (䄆 Netminder) Commented:
>>The error will be given in the language you set.

Perfect example of that exact scenario in the last link I posted.

The value specified for NLS_LANGUAGE in the initialization parameter file is the default for all sessions in that instance. For example, to specify the default session language as French, the parameter should be set as follows:


Consider the following server message:

ORA-00942: table or view does not exist

When the language is French, the server message appears as follows:

ORA-00942: table ou vue inexistante
ALad2005Author Commented:
You guys are awesome!!!
Thank you for sharing your vast knowledge of oracle in understandable language!!!
ALad2005Author Commented:
Great documentation link Slightw!!!
sorry this leads another question, how can I check what languages are available?
Is there a way to check this?
Thanks in advance.
slightwv (䄆 Netminder) Commented:
>>how can I check what languages are available?

Yep.  Did you poke around the Globalization Support Guide to see what all it has?

Normally lists can be found in the appendix:

Remember that available doesn't mean installed.  If you want a specific language you need to make sure it was installed with the software.
ALad2005Author Commented:
Got it !!! Thank you so much Slightvw!  You answered all my questions to fullest  !
Geert GOracle dbaCommented:
one small thing you may find in the doc links, but need to be aware of ...
make sure your database character set supports the languages you need to support

easiest is to support all by choosing the unicode characterset: AL32UTF8

see chapter 2 of the globalization support guide.

that's the basis of the whole thingy
ALad2005Author Commented:
Thank you so much Slightwv  and Geert for your help.  I got much more than I asked for !!! so that's really great.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.