The relationship between tts and character sets -- requires that the source and target database character sets must be the same, and the national character sets must be the same ., Tts Character Set

Source: Internet
Author: User

The relationship between tts and character sets -- requires that the source and target database character sets must be the same, and the national character sets must be the same ., Tts Character Set
The relationship between tts and character sets -- requires that the source and target database character sets must be the same, and the national character sets must be the same.
Imp sys/as TRANSPORT_TABLESPACE = Y datafiles = C: \ oracle \ product \ 10.2.0 \ oradata \ a \ test01.dbf 'file = c: \ tts_test.dmp log = c: \ imp_tts.log

IMP-00058: ORACLE error 1017 encounteredORA-01017: invalid username/password; logon deniedUsername: Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bit ProductionWith the Partitioning, OLAP and Data Mining options
Export file created by EXPORT: V09.02.00 via conventional pathAbout to import transportable tablespace (s) metadata... import done in ZHS16GBK character set and AL16UTF16 NCHAR character setexport client uses AL32UTF8 character set (possible charset conversion ). importing SYS's objects into SYS. importing SYS's objects into SYSIMP-00017: following statement failed with ORACLE error 29345: "BEGIN sys. dbms_plugts.beginImport ('9. 2.0.1.0 ', 873, '123', NULL, 'null', 2000 "" 17,21201, 1); END; "IMP-303: ORACLE error 00003 encounteredORA-29345: cannot plug a tablespace into a database using an incompatible character setORA-06512: at "SYS. DBMS_PLUGTS ", line 22.16ora-06512: at" SYS. DBMS_PLUGTS ", line 1946ORA-06512: at line 1IMP-00000: Import terminated unsuccessfully
The error message "ZHS16GBK" is returned when you export data on AL32UTF8.

Oracle Chinese is displayed as a question mark. How can this problem be solved? the client and server character set are the same

The most useful parameter for Oracle database character sets is the NLS_LANG parameter, in the following format: NLS_LANG = language_territory.charset

Anguage: the language of the server message. Is it Chinese or English?
Territory: the date and number format of the server,
Charset: Specifies the character set.
Log on to sysdba and view the select * from v $ nls_parameters view. You can know the specific character set parameters,
Normally, it should be
1NLS_LANGUAGE = SIMPLIFIED CHINESE

2NLS_TERRITORY = CHINA

3NLS_CHARACTERSET = ZHS16GBK
If you have any questions, modify the parameters in the parameter file. You 'd better back up the data!
It is risky to change the character set.
Client settings (linux)
$ NLS_LANG = "simplified chinese" _ china. zhs16gbk
$ Export NLS_LANG
. Database Server Character Set
Select * from nls_database_parameters
Is the character set of the database, or v $ nls_parameters

Client Character Set Environment
Select * from nls_instance_parameters
Or v $ parameter indicates the character set setting of the client, which may be a parameter file, environment variable, or registry.

Session Character Set Environment
Select * from nls_session_parameters
V $ nls_parameters indicates the session's own settings. It may be the session's environment variable or the alter session is completed. If the session has no special settings, it will be consistent with nls_instance_parameters.
The above will be OK,
(For reference only. If there are similarities, it is a coincidence)

How to view the character set of the Oracle database, detailed operations, xx

Database Server Character Set select * from nls_database_parameters, which is derived from props $ and represents the character set of the database.
  
Client Character Set environment select * from nls_instance_parameters, which is from v $ parameter,
  
Indicates the character set setting of the client, which may be a parameter file, environment variable, or registry.
  
Select * from nls_session_parameters in the session Character Set environment, which is derived from v $ nls_parameters, indicating the session's own settings, which may be the session environment variable or the session is completed by alter session. If the session has no special settings, it will be consistent with nls_instance_parameters.
  
The character set of the client must be the same as that of the server to correctly display non-Ascii characters of the database. If multiple settings exist, alter session> environment variable> registry> parameter file
  
The character set must be consistent, but the language settings can be different. We recommend that you use English for language settings. If the character set is zhs16gbk, The nls_lang can be American_America.zhs16gbk.

Involves three character sets,
1. Character Set on the El server side;
2. Character Set of oracle client;
3. dmp file character set.

During data import, the three character sets must be consistent before the data can be correctly imported.

2.1 query character sets on oracle server
There are many ways to find the character set of the oracle server. The intuitive query method is as follows:
SQL> select userenv ('language') from dual;
USERENV ('language ')
----------------------------------------------------
SIMPLIFIED CHINESE_CHINA.ZHS16GBK

SQL> select userenv ('language') from dual;
AMERICAN _ AMERICA. ZHS16GBK

2.2 how to query the dmp file Character Set
The dmp file exported using oracle's exp tool also contains character set information. The 2nd and 3rd bytes of the dmp file record the character set of the dmp file. If the dmp file is not large, for example, only a few MB or dozens of MB, you can use UltraEdit to open it (in hexadecimal mode) and view the content of 2nd 3rd bytes, such as 0354, then, use the following SQL statement to find the corresponding character set:
SQL> select nls_charset_name (to_number ('20140901', 'xxxxx') from dual;
ZHS16GBK

If the dmp file is large, for example, 2 GB or above (this is also the most common case), you can use the following command (on a unix host) to open it slowly or completely ):
Cat exp. dmp | od-x | head-1 | awk '{print $2 $3}' | cut-c 3-6
Then, you can use the preceding SQL statement to obtain its character set.

2.3 query character sets of oracle client
On windows, it is the NLS_LANG of OracleHome in the registry. You can also set it in the dos window,
For example: set nls_lang = AMERICAN_AMERICA.ZHS16GBK
In this way, only the environment variables in this window are affected.

On the unix platform, the environment variable NLS _... the remaining full text>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.