Dynamically change NLS_LANG

Here is a simple way to open SQL*Plus windows in two databases, without the need to use the registry to change NLS_LANG.

When there are databases with different nls_lang, you need to change your registry parameters when switching between...

DBs. Here is a simple way to open a SQL*Plus window to a database with a particular nls_lang without the need to change the registry.

Create a batch file on your desktop for every database with the name SID.bat, and type in these commands:

Example I:
# this is an example for using sql plus on UTF8 db from a client

set NLS_LANG=AMERICAN_AMERICA.IW8ISO8859P8
o:orawin95binplus80w.exe ps8/ps8@ps8dvlp

Example II:
# this is an example for using sql plus on WE8ISO8859P1 db from a client

set NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
o:orawin95binplus80w.exe ps8/ps8@ps8dvlp

and so on.

For More Information

  • What do you think about this tip? E-mail the Editor at tdichiara@techtarget.com with your feedback.
  • The Best Oracle Web Links: tips, tutorials, scripts, and more.
  • Have an Oracle tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
  • Ask your technical Oracle questions--or help out your peers by answering them--in our live discussion forums.
  • Check out our Ask the Experts feature: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.

This was last published in May 2002

Dig Deeper on Oracle and SQL

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close