Linux modifies the character set of Oracle 10g

Source: Internet
Author: User

Modify the database character set to: ZHS16GBK
Viewing the server-side character set
SQL > select * from V$nls_parameters
Modify:
$sqlplus/nolog
Sql>conn/as sysdba~
If the database server is now started, execute SHUTDOWN IMMEDIATE first
To close the database server, and then execute the following command:
Sql>shutdown immediate~
Sql>startup mount~
Sql>alter SYSTEM ENABLE RESTRICTED session~
Sql>alter SYSTEM SET job_queue_processes=0~
Sql>alter SYSTEM SET aq_tm_processes=0~
Sql>alter DATABASE open~
Sql>alter DATABASE CHARACTER SET zhs16gbk~
*
ERROR at line 1:
Ora-12721:operation cannot execute when other sessions is active
If the above error occurs, use the following method to modify, using Internal_use can skip the check of the superset:
Sql>alter DATABASE CHARACTER SET internal_use zhs16gbk~
Sql>shutdown immediate~
Sql>startup

Oracle gb2312 Character Set turn Utf-8

Recently because of some special needs, considering the future development of the system,
Changed the character set of the existing Oracle database gb2312 to UTF-8
Steps:
1. In Sql*plus, log in as DBA
Conn User name as Sysdba
2. Execute the conversion statement:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT EXCLUSIVE;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET job_queue_processes=0;
ALTER SYSTEM SET aq_tm_processes=0;
ALTER DATABASE OPEN;
ALTER DATABASE National CHARACTER SET UTF8;
SHUTDOWN immediate;
Startup

Note: If there are no large objects, there is no effect on language conversions during use (remember that the set must be supported by Oracle, otherwise it cannot start)

You can do it as above, but there may be ' Ora-12717:cannot ALTER DATABASE national CHARACTER SET when
NCLOB data exists ' such a message

There are two ways to solve this problem

One is to use the Internal_use keyword to modify the regional settings,
There is also the use of re-create, but re-create a bit complicated, so please use Internal_use,

SHUTDOWN IMMEDIATE;
STARTUP MOUNT EXCLUSIVE;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET job_queue_processes=0;
ALTER SYSTEM SET aq_tm_processes=0;
ALTER DATABASE OPEN;
ALTER DATABASE National CHARACTER SET internal_use UTF8;
SHUTDOWN immediate;
Startup

If you do this, the national charset locale is fine.

Linux modifies the character set of Oracle 10g

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.