Closed IsaacYQH closed 10 months ago
If you want to change just the language used in SQL*Plus, you can do that with the NLS_LANG
environment variable. For example:
[oracle@oracle-21c-vagrant ~]$ NLS_LANG=FRENCH sqlplus SYSTEM@ORCLPDB1
SQL*Plus: Release 21.0.0.0.0 - Production on Lun. Mars 20 09:12:01 2023
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Entrez le mot de passe :
Heure de la derni□re connexion r□ussie : Lun. Mars 20 2023 09:09:53 -06:00
Connect□ □ :
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> SELECT * FROM no_such_table;
SELECT * FROM no_such_table
*
ERREUR □ la ligne 1 :
ORA-00942: Table ou vue inexistante
You could export the NLS_LANG
environment variable in the oracle user's .bashrc
file so it doesn't need to be set every time you run SQL*Plus.
Setting the language for the database itself is a much bigger topic, involving not only character sets but also datetime data types, currency symbols, sorting, etc. The parameters are documented in the Database Globalization Support Guide.
In Vagrantfile, changing the character set is possible, but I can not find a way to change the language used in sqlplus. Changing the language and characterset in installed sqlplus is an annoying process. So maybe define it before installtion is a better way. Does anybody know how to solve this problem? A lot of thanks!!!