I have a large set of files with SQL commands that I run with a SQL*Plus script that uses the
@@ operator. I run the script on third-party computers (or even send it by e-mail) so I'd like to make it as self-contained as possible.
Files are encoded as Win-1252. Currently, I need to set the
NLS_LANG environment variable before running the script:
C:\> SET NLS_LANG=SPANISH_SPAIN.WE8MSWIN1252 C:\> echo exit | sqlplus foo/bar@//example.com/xe @install.sql
This works but I wonder if it's possible to change the client encoding with a SQL or SQL*Plus command. (Or at least read the value and abort execution if it doesn't match.)