Oracle Database 11g Express Edition Modify character set

Source: Internet
Author: User

Why would you want to modify the character set?

Using the user system, connect to the Oracle database via the Sqlplus program, and enter the following command to view the character set:

SQL>Select Userenv (' language ') from  dual; USERENV (  ' LANGUAGE ') -- --------------------------------------------------  American_america. Al32utf8SQL>

We can see the found character set as "American_america." Al32utf8", while the common character set for domestic databases is"ZHS16GBK".

For example, if a field is defined in Enterprise Edition as VARCHAR2 (4) and the data is "Tian Tian", then when importing oraclexe, the field definition is still VARCHAR2 (4), but the data ' Tian Tian ' needs to occupy 6 characters length, the problem appears as follows:

IMP-00019: Deny row due to ORACLE error 12899
IMP-00003: Encountering ORACLE error 12899
ORA-12899: Column "TEST". " Test_tianyc "." The value of a "is too large (actual value: 6, Maximum value: 4)

You will need to follow the instructions below to resolve the issue.

Operating instructions:

Start menu-All Programs-->oracle Database 11g Express edition--> run the SQL command line to start the Sqlplus program.

Because the Sqlplus program does not support directly in the program window right-click, copy, paste and other operations, so the blogger is to run the command line to start the Sqlplus program.

Start Menu--run--input cmd, and return--open cmd command line.

Microsoft Windows [version 6.1.7601] Copyright (c) Microsoft Corporation. All rights reserved. C:\users\candy>C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe/nologSql*plus:release 11.2.0.2.0 Production on Wednesday November 12:11:59 2014Copyright (c) 1982, Oracle. All rights reserved. Sql>Connect system as SYSDBAEnter Password: connected. Sql>Shutdown ImmediateThe database is closed. The database has been uninstalled. The ORACLE routine has been closed. Sql>Startup MountThe ORACLE routine has been started. Total System Global area 644468736 bytesfixed size 1385488 bytesvariable size 192941040 byte Sdatabase buffers 444596224 Bytesredo buffers 5545984 bytes database loaded. Sql>alter system enable restricted session;The system has changed. Sql>alter system set job_queue_processes=0;The system has changed. Sql>alter system set aq_tm_processes=0;The system has changed. Sql>ALTER DATABASE open;The database has changed. Sql>ALTER DATABASE character set Internal_use ZHS16GBK;The database has changed. Sql>Shutdown ImmediateThe database is closed. The database has been uninstalled. The ORACLE routine has been closed. Sql>StartupThe ORACLE routine has been started. Total System Global area 644468736 bytesfixed size 1385488 bytesvariable size 192941040 byte Sdatabase buffers 444596224 Bytesredo buffers 5545984 bytes database loaded. The database is already open. Sql>Select Userenv (' language ') from dual;USERENV (' LANGUAGE ')----------------------------------------------------simplified Chinese_china. ZHS16GBKSql>

At this point, the data import or the field type VARCHAR2 (4) field is inserted in "Tian Tian", there will be no error.

Modifying the character set may cause Navicat to not connect to the Oracle database, change the value of the OCI library (oci.dll) in the menu-to-tool-and-other-->OCI

C:\oraclexe\app\oracle\product\11.2.0\server\bin\oci.dll, click OK, restart Navicat.

Oracle Database 11g Express Edition Modify character set

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.