高级搜索 返回首页  
名人名言
技术文章
    - LINUX文章
少达网技术文章ORACLE 修改字符集
ORACLE 修改字符集
2020-09-30 8:38:32
by ORACLE 修改字符集  
Rating: not rated yet
1 2 3 4 5 6 7 8 9 10

ORACLE 修改字符集

"

"

 

C:\Users\Administrator>sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 9月 30 08:24:50 2020

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> SQL>conn / as sysdba
SP2-0734: 未知的命令开头 "SQL>conn /..." - 忽略了剩余的行。
SQL> conn / as sysdba
已连接。
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> STARTUP MOUNT
ORACLE 例程已经启动。

Total System Global Area 1.0289E+10 bytes
Fixed Size                  2184672 bytes
Variable Size            5268048416 bytes
Database Buffers         4999610368 bytes
Redo Buffers               18771968 bytes
数据库装载完毕。
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;
ALTER DATABASE CHARACTER SET ZHS16GBK
*
第 1 行出现错误:
ORA-12712: 新字符集必须为旧字符集的超集


SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK;

数据库已更改。

SQL>  select * from v$nls_parameters;

PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_LANGUAGE
SIMPLIFIED CHINESE

NLS_TERRITORY
CHINA

NLS_CURRENCY


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_ISO_CURRENCY
CHINA

NLS_NUMERIC_CHARACTERS
.,

NLS_CALENDAR
GREGORIAN


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_DATE_FORMAT
DD-MON-RR

NLS_DATE_LANGUAGE
SIMPLIFIED CHINESE

NLS_CHARACTERSET
ZHS16GBK


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_SORT
BINARY

NLS_TIME_FORMAT
HH.MI.SSXFF AM

NLS_TIMESTAMP_FORMAT
DD-MON-RR HH.MI.SSXFF AM


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_TIME_TZ_FORMAT
HH.MI.SSXFF AM TZR

NLS_TIMESTAMP_TZ_FORMAT
DD-MON-RR HH.MI.SSXFF AM TZR

NLS_DUAL_CURRENCY


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_NCHAR_CHARACTERSET
AL16UTF16

NLS_COMP
BINARY

NLS_LENGTH_SEMANTICS
BYTE


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_NCHAR_CONV_EXCP
FALSE


已选择19行。

SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup
ORACLE 例程已经启动。

Total System Global Area 1.0289E+10 bytes
Fixed Size                  2184672 bytes
Variable Size            5268048416 bytes
Database Buffers         4999610368 bytes
Redo Buffers               18771968 bytes
数据库装载完毕。
数据库已经打开。
SQL> select * from v$nls_parameters;

PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_LANGUAGE
SIMPLIFIED CHINESE

NLS_TERRITORY
CHINA

NLS_CURRENCY


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_ISO_CURRENCY
CHINA

NLS_NUMERIC_CHARACTERS
.,

NLS_CALENDAR
GREGORIAN


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_DATE_FORMAT
DD-MON-RR

NLS_DATE_LANGUAGE
SIMPLIFIED CHINESE

NLS_CHARACTERSET
ZHS16GBK


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_SORT
BINARY

NLS_TIME_FORMAT
HH.MI.SSXFF AM

NLS_TIMESTAMP_FORMAT
DD-MON-RR HH.MI.SSXFF AM


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_TIME_TZ_FORMAT
HH.MI.SSXFF AM TZR

NLS_TIMESTAMP_TZ_FORMAT
DD-MON-RR HH.MI.SSXFF AM TZR

NLS_DUAL_CURRENCY


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_NCHAR_CHARACTERSET
AL16UTF16

NLS_COMP
BINARY

NLS_LENGTH_SEMANTICS
BYTE


PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_NCHAR_CONV_EXCP
FALSE


已选择19行。

SQL>

 select userenv('language') from dual;

select * from v$nls_parameters where parameter in  ( 'NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET');  

推荐给好??? 打包下载这篇文章 打印这篇文章

Copyright © 2002-2022 http://www.shaoda.com
All rights reserved.

备案号:浙ICP备17002154号-5 Powered by: myarticle.com.cn Version 1.0dev
Processed Time: 0.0027 s Querys: 5 [ Gzip Level 0 ]