Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle sqlplus execute files of different encoding

I have a batch file that execute SQL scripts through sqlplus:

(
   echo @"./myUTF8.sql"
   echo @"./myAnsi.sql"
) | sqlplus uset/pwd@mybd

Unfortunately these SQL scripts are generated in different encoding, Ansi, UTF8, ...

How can I tell sqlplus that a script is of a specified encoding?

like image 366
user1753180 Avatar asked Dec 18 '22 08:12

user1753180


1 Answers

I have a SQL script created in UTF8, to run it with sqlplus in Linux, before open sqlplus do

export NLS_LANG=.AL32UTF8

then use sqlplus to load the script.

like image 173
Feng Zhang Avatar answered Dec 28 '22 06:12

Feng Zhang