Oracle 10 Gb modification of database Character Set

Source: Internet
Author: User

View Current Character Set

Reference
SQL> select * from nls_database_parameters where parameter like '% SET % ';

PARAMETER VALUE
----------------------------------------------------------------------
NLS_CHARACTERSET WE8ISO8859P1
NLS_NCHAR_CHARACTERSET AL16UTF16

Reference
SQL> select userenv ('language') from dual;

USERENV ('language ')
----------------------------------------------------
AMERICAN_AMERICA.WE8ISO8859P1

Try to modify character set directly

Reference
SQL> ALTER DATABASE CHARACTER SET ZHS16GBK;
Alter database character set ZHS16GBK
*
ERROR at line 1:
ORA-12712: new character set must be a superset of old character set

Use Oracle Internal commands to modify character sets (

Note: This process is only used for testing. We recommend using CSALTER in Oracle 10 Gb!
)

Reference
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 62916852 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;

SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;

System altered.

SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES = 0;

System altered.

SQL> ALTER SYSTEM SET AQ_TM_PROCESSES = 0;

System altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE zhs16gbk;

Database altered.


The alert Log is displayed at the time of modification:

Completed: ALTER DATABASE OPEN
Tue May 18 10:56:43 2010
Alter database character set INTERNAL_USE zhs16gbk
Tue May 18 10:56:47 2010
Updating character set in controlfile to ZHS16GBK
Synchronizing connection with database character set information
Refreshing type attributes with new character set information
Completed: alter database character set INTERNAL_USE zhs16gbk


View the modified result:

SQL> select * from nls_database_parameters where parameter like '% SET % ';

PARAMETER
------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_CHARACTERSET
ZHS16GBK

NLS_NCHAR_CHARACTERSET
AL16UTF16

SQL> select userenv ('language') from dual;

USERENV ('language ')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK

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.