We have a database set up on a German network using Windows NT4. The NLS settings (presumably inherited from the OS default) are German.
I want to reset this to American. Is it simply a matter of setting NLS_LANGUAGE & NLS_TERRITORY to AMERICAN & AMERICA in the init.ora file? Or must I also set NLS_CHAR_SET as well?
I've been told that setting NLS_TERRITORY as an init parameter will change the decimal and comma separators, local currency symbols etc. and NLS_LANGUAGE changes date formats.
The West European CHARSET of WE8ISO8859P1 should support German ... shouldn't it? I've tried inserting German text (with umlauts etc) into our DB here and they commit okay.
I need to change it all for all future sessions, so it has to be DB level.
There are two character sets that will work and I don't know the differences. They are
My understanding is that the database character set is fixed at database creation. You can convert to a character set that is a superset of the character set, but not a subset if you are loading the data into a new database, but as far as I know, you cannot issue an ALTER DATABASE command to change the database character set.
You are correct on the NLS_TERRITORY remark.
You can also use
SET NLS_NUMERIC_CHARACTERS to switch the functions of comma and decimal point.
I was once required to change the database character set. Oracle states that the character set is fixed at database creation, but I contacted Oracle support at the time (this was about 3 years ago), and they were able to supply me with a script that would make the change.
The main issue is that if you set the character set to an invalid value, the database will be corrupted.
IIRC, what the script did was to prompt for the desired new characterset, perform a translation of a character into the new character set (can't remember which SQL function this used - might even have been 'translate ). If the translation was successful, a confirmation message was displayed by the script, and the database character set was changed on an affirmative response to the prompt. I think it did use the alter database characterset command.
Looking at it - the character set is okay. Western European can cope with German and English/US characters.
I'm really trying to change the NLS_DATE_FORMAT as the application running on it keeps returning INVALID_MONTH errors (ORA-01843). The German default is DD-MM-YY and I think the application (via ODBC) is passing DD-MON-YY to the database. I can't get at the source code so I can't check exactly what's going on.
I've tried setting the init.ora file NLS_DATE_FORMAT parameter but it doesn't seem to take effect (??). I've also set NLS_LANGUAGE and NLS_TERRITORY and this doesn't seem to work either. The Alert file shows the new params at startup but when you fire up SQL*Plus and look - the old parameters still hold sway.
I can dynamically change them using ALTER SESSION but that's not good enough. I need it to be permanent for all sessions.