Wednesday, August 1, 2007

ORA-12705: Cannot access NLS data files or invalid environment specified

The other day I got this annoying oracle error: ORA-12705: Cannot access NLS data files or invalid environment specified. Funny thing I wasn't trying to access NLS data files, I don't even now what they are. So in case this happens to you ...

There are two possible causes:

  • An attempt was made to issue an ALTER SESSION statement with an invalid NLS parameter or value.

  • The NLS_LANG environment variable contains an invalid language, territory, or character set.

    Fix:

    Unset the NLS_LANG environment variable

  • Windows - The NLS_LANG must be unset in the Windows registry (re-named is best). Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, and rename it.

  • Linux/UNIX - Here you simply issue the Linux command "unset NLS_LANG"
  • 12 comments:

    Tom said...

    I live for these moments ;^)

    Marquito said...

    Thank you! I can finally connect to my db!

    Anonymous said...

    Was solving it for week!! And voila, this was enough!! PHP works great now, thaks a lot guys!!

    id said...

    Thank you. You safe me :)

    Anonymous said...

    Thank you!

    Renamed NLS_LANG to NLS_LANG1 works :)

    Occured out of the blue when i installed Oracle 11g and rebooted my machine

    Anonymous said...

    Here is my comment for such a amazing post.

    Anonymous said...

    Sweet blog! I found it while surfing around on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I've been trying for a while but I never seem to get there! Appreciate it
    Feel free to visit my blog post ; online casino for real money

    Anonymous said...

    Useful info. Fortunate me I discovered your website by chance, and I'm shocked why this accident did not happened in advance! I bookmarked it.
    My webpage :: slots real money

    Anonymous said...

    Please let me know if you're looking for a author for your site. You have some really good articles and I believe I would be a good asset. If you ever want to take some of the load off, I'd absolutely love to write some articles
    for your blog in exchange for a link back to mine. Please send me an email if interested.
    Thanks!
    My blog post : legitimate affiliate programs

    Anonymous said...

    Amazing blog! Do you have any recommendations for aspiring
    writers? I'm planning to start my own site soon but I'm a little
    lost on everything. Would you advise starting with a free platform like Wordpress or go for a paid option?
    There are so many choices out there that I'm completely overwhelmed .. Any suggestions? Thanks!
    Take a look at my weblog ... play slots for money

    Anonymous said...

    Wonderful beat ! I would like to apprentice while you amend your site, how can
    i subscribe for a blog website? The account helped me a acceptable deal.
    I had been a little bit acquainted of this
    your broadcast offered bright clear idea
    Here is my blog :: online casinos usa players

    Anonymous said...

    If you want to improve your experience just keep visiting this web site and be
    updated with the most recent news posted here.
    Also see my webpage :: money in online casinos