In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to change the Oracle character set and change the ZHS16GBK to UTF8, many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
SQL > select name,value$ from props$ where name like'% NLS%'
NAME VALUE$
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS.
NLS_CHARACTERSET ZHS16GBK
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NAME VALUE$
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.1.0
20 rows selected.
NLS_CHARACTERSET is the database character set, NLS_NCHAR_CHARACTERSET is the national character set
There are two types of character data in ORACLE. VARCHAR2 stores data according to the database character set.
NVARCHAR2 stores data according to the national character set. Similarly, CHAR and NCHAR are the same, one is the database character, the other is the national character set.
Convert character set, database should be in RESTRICTED mode
First of all, it is necessary to determine whether the modified character set is a superset before modification, if it is not possible that the same code points correspond to different characters, resulting in garbled problems.
This error occurs because oracle only supports the transition from subset to superset.
Is there any way to cast?
This instruction will skip the test of subset and superset, of course, forced conversion may cause data corruption, so use it with caution!
The following is executed with the help of eygle's post.
SQL > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL > startup mount
ORACLE instance started.
Total System Global Area 1845493760 bytes
Fixed Size 2021568 bytes
Variable Size 452986688 bytes
Database Buffers 1375731712 bytes
Redo Buffers 14753792 bytes
Database mounted.
SQL > alter session set sql_trace=true
Session altered.
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 UTF8
Database altered.
SQL > update props$ set VALUE$='UTF8' where NAME='NLS_NCHAR_CHARACTERSET'
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.