Question: When IMP a DMP file, prompt does not support the required character set conversion (from type
850 to
852).
principle:
Oracle Multilan Language Settings To support world-wide language and character sets, generally for language tips, monetary forms, sorting methods, and CHAR, VARCHAR2, CLOB, and LONG fields. Oracle's multi-language settings is the main two feature of national language settings and character set settings. The national language setting determines the language type of interface or prompt, and the character set determines the database save and character set. (Such as text) encoding rules.
Oracle character set setting, divided into database character sets and client character set environment settings. In the database end, the character set is set when the database is created, and saved in the database PROPS Table table, for 8i products, you can use 'ALTER DATABASE CHARACTER SET Character Set' to modify the character set of the database, but it is only just From subset to supercharge, do not modify the character set through the Update Props $, if it is not supported, you may lose all the data related to the character set, which is the supported conversion, or the database is not working properly. The character set is divided into single-byte character set and multi-byte character set, US7ASCII is a typical single-byte character set, in this character set Length = Lengthb, and zHS16GBK is a common double-word character set, here Lengthb = 2 * Length.
The character set environment in the client is relatively simple, mainly environment variables or registration items NLS_LANG, note NLS_LANG's priority to: Parameter file à REPUS à Environment Variable àalter session. The group of NLS_LANG is "national language settings. Character set", such as NLS_LANG = Simplified Chinese_China.zHS16GBK. The client's character set is preferably the same as the database end (country language settings can be different, such as the zhs16GBK character set, the client can be NLS_LANG = Simplified Chinese_China.zhs16GBK or AMEIRCAN_AMERICA.ZHS16GBK, do not affect the normal display of the database character), if The character set is different, and the conversion of the character set is not compatible, then the client's data display and the data related to the export / imported and the character set will be garbled.
Program:
Use 2 credit editing tools, such as uedit32. Open the exported DMP file, get 2, 3 bytes of content, such as 00 01, first convert it to 10 Enter the number, 1, use the function nls_charset_name to get the character set:
SQL> SELECT NLS_CHARSET_NAME (1) from dual;
NLS_CHARSET_NAME (1)
-------------------
US7ASCII
You can know that the character set of the DMP file is US7ASCII, if you need to convert the DMP file to zHS16GBK, you need to get the number of the character set with NLS_Charset_ID:
SQL> SELECT NLS_CHARSET_ID ('zhs16gbk') from dual;
NLS_CHARSET_ID ('zhs16GBK')
----------------------------
852