Description of the phenomenon
I was under AIX. When the following SQL statement is imported, garbled characters are displayed in the database.
Insert into CONFERENCE (Conferenceid,subconferenceid,accessnumber,accountid,allocatedid,allowvideocontrol, Screentype,screenswitchmode,boardnum,canrecord,chargemode,conferencemode,conferencestate,conferencetype, Cycletype,endtime,enterprompt,factendtime,language,leaveprompt,length,lockstate,mediatypes,membernotify,memo, Needaddmemotosms,needautoinvite,needautokinescope,needautorecord,needinvitepwd,needparticipatorlimit, Organizationid,permitinvite,permitkinescope,permitrecord,realorganizationid,reason,recordfilepath,reservesize, Schedulenotify,schedusermobile,schedusername,conferencesize,speakstate,starttime,subject,summertime,timezone, UPDATENOTIFY,VOICERECORDSTATE,VOICETOPICPATH,VOICETOPICSTATE,EXT1,EXT2,EXT3) VALUES (' 0000152972 ', 2, ' 25001 ', ' 1 ', 16,0, ', ', ' 1270015060 ', 0, ' Scheduler ', ' COMMON ', ' Schedule ', ' Schedule ', ' cycle ', 1238251500000, ', 1238251500000, ' Zh_cn ', ', 840, ', ' video ', 1, ', 0,0,0,0,0,0, ' toporganization ', 1,1,1, ' Toporganization ', 0, ' 20090328/meet0000152972 ', 3, 1, ', ', 3,1,1238201100000, ' WeekPeriod video Conferencing ', 0,56,1, ' Unrecord ', ' 0000152972 ', ' Unrecord ', null,null,null);
1.2 Possible causes
1. The fields in the inserted SQL statement contain Chinese, because the database character set differs from the operating system CharSet setting, which causes the database to display garbled characters.
2, from the local (not garbled) to the server after the garbled, if the import of data is bound to garbled, so to solve the problem of passing files
1.3 Processing steps
The machine where the Oracle user logs on to the database. Connect the database to the sysdba user.
% Sqlplus/as sysdba
Check the value of the database character set parameter "Nls_language".
sql> Select value from Nls_database_parameters where parameter= ' nls_language ';
The display parameter value is "AMERICAN".
VALUE
--------------------------------------------------------------------------------
AMERICAN
Check the value of the database character set parameter "Nls_territory".
sql> Select value from Nls_database_parameters where parameter= ' nls_territory ';
The display parameter value is "AMERICA".
VALUE
--------------------------------------------------------------------------------
AMERICA
Check the value of the database character set parameter "Nls_characterset".
sql> Select value from Nls_database_parameters where parameter= ' nls_characterset ';
The display parameter value is "we8mswin1252".
VALUE
--------------------------------------------------------------------------------
we8mswin1252
Modify the character set "Nls_lang" variable of the machine operating system where the database resides, based on the character set parameters of the database query.
sql> export Nls_lang=american_america. we8mswin1252
"AMERICAN", "AMERICA", "we8mswin1252" are 3, 4, 5 query results.
Import. sql file under Linux, database Chinese garbled