开发者

Oracle Database Character Set

开发者 https://www.devze.com 2022-12-12 02:06 出处:网络
Hello how do I change or alter the character set of a database for it to support nihongo charact开发者_StackOverflow中文版ersYou should be fine with any variety of UTF-8.

Hello how do I change or alter the character set of a database for it to support nihongo charact开发者_StackOverflow中文版ers


You should be fine with any variety of UTF-8.

The character set is usually specified when creating the database. If you need to change it later, there is the ALTER DATABASE CHARACTER SET command, but that requires data migration:

To change the database character set, perform the following steps:

  1. Shut down the database, using either a SHUTDOWN IMMEDIATE or a SHUTDOWN NORMAL statement.
  2. Do a full backup of the database because the ALTER DATABASE CHARACTER SET statement cannot be rolled back.
  3. Complete the following statements:
  STARTUP MOUNT;
  ALTER SYSTEM ENABLE RESTRICTED SESSION;
  ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
  ALTER SYSTEM SET AQ_TM_PROCESSES=0;
  ALTER DATABASE OPEN;
  ALTER DATABASE CHARACTER SET new_character_set;
  SHUTDOWN IMMEDIATE; -- or SHUTDOWN NORMAL; 
  STARTUP;

As you can see, you need to offline and convert the database.


And Unicode is your friend, use NVARCHAR or NTEXT.

0

精彩评论

暂无评论...
验证码 换一张
取 消