The author encountered the following problems in the process of doing the project, the database backup files provided by the customer need to be imported into the database, in order to use, the database is Oracle 9.1.1, installed in the Windows Server, JP system, server-side character set is Japanese_japan_ UTF8, while the client is using the Chinese Windows Server 2000 system, the character set is simplified Chinese_china. ZHS16GBK.
The following problems occurred during the insertion of data:
C:\oracle\ora90\bin>imp scott/tiger@sdes full=y file=c:\expdat.dmp
Import:release 9.0.1.1.1-production on Monday January 22 19:05:43 2007
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connect to: Oracle9i release 9.0.1.1.1-production
Jserver Release 9.0.1.1.1-production
IMP-00016: Required character set conversion is not supported (from type 830 to 852)
IMP-00000: Failed to terminate import successfully
Use the 2-in-file editing tool, such as Uedit32. Open the exported DMP file, get 2, 3 bytes of content, such as 00 01, first convert it to 10, 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 and if you need to replace the character set of the DMP file with ZHS16GBK, you need to get the number of the character set with nls_charset_id: The author encounters 830 to 852 types of conversion errors, Enter Oracle's Sqlplus and make the following query:
Sql> Select Nls_charset_name (830) from dual;
Nls_charset_na
--------------
Ja16euc
Sql> Select Nls_charset_name (852) from dual;
Nls_charset_name
----------------
Zhs16gbk
Sql>
Sql> Select nls_charset_id (' ZHS16GBK ') from dual;
nls_charset_id (' ZHS16GBK ')
--------------------------
852