1.1 symptom description when the following SQL statement is imported, garbled characters are displayed in the database.
Insert into CONFERENCE (values, values, ACCESSNUMBER, ACCOUNTID, ALLOCATEDID, ALLOWVIDEOCONTROL, SCREENTYPE, values, BOARDNUM, CANRECORD, CHARGEMODE, values, CYCLETYPE, ENDTIME, ENTERPROMPT, FACTENDTIME, LANGUAGE, delimiter, LENGTH, LOCKSTATE, MEDIATYPES, MEMBERNOTIFY, MEMO, delimiter, delimiter, needautokind, NEEDAUTORECORD, delimiter, delimiter, ORGANIZATIONID, identifier, permitkincord, PERMITRECORD, REALORGANIZATIONID, REASON, Snapshot, RESERVESIZE, SCHEDULENOTIFY, SCHEDUSERMOBILE, SCHEDUSERNAME, CONFERENCESIZE, SPEAKSTATE, STARTTIME, SUBJECT, SUMMERTIME, TIMEZONE, UPDATENOTIFY, values, EXT1, EXT2, EXT3) values ', 2, '123', '1', 16, 0, '','', '123', 0, 'schedule', 'common', 'schedule', 'schedule ', 'cycle', 1238251500000, '', 1238251500000, 'zh _ cn','', 840, '', 'video', 1, 'toporganization', 20090328, 1, 'toporganization', 0, '2017/meet0000152972 ', 1238201100000, '','', 'periodic videoconferencing, 1, 'unrecord', '20170101', 'unrecord', null, null );
1.2 The reason may be that the inserted SQL statement contains Chinese characters. Because the character set of the database is different from the character set of the operating system, garbled characters are displayed in the database. 1.3 Procedure
OracleThe machine on which the user logs on to the database. To
SysdbaThe user connects to the database.
% 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 displayed 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 displayed 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 displayed parameter value is WE8MSWIN1252 ".
VALUE
--------------------------------------------------------------------------------
WE8MSWIN1252
Modify the character set "NLS_LANG" variable of the operating system of the database Machine Based on the character set parameters queried in the database.
SQL> export NLS_LANG = AMERICAN_AMERICA.WE8MSWIN1252
"AMERICAN", "AMERICA", and "WE8MSWIN1252" are the query results of 3, 4, and 5.