ORACLE显示中文为乱码,怎么修改?
在Redhat上安装Oracle10g没有设定字符集,采用的是操作系统默认字符集:WE8ISO8859P1,将字符集修改为:ZHS16GBK。由于过程不可逆,首先需要备份数据库。\x0d\x0a1.数据库全备\x0d\x0a\x0d\x0a2.查询当前字符集\x0d\x0aSQLselect*fromnls_database_parameterswhereparameter='NLS_CHARACTERSET';\x0d\x0aPARAMETERVALUE\x0d\x0a--------------------------------------------------------------------------------\x0d\x0aNLS_CHARACTERSETWE8ISO8859P1\x0d\x0a\x0d\x0a3.关闭数据库\x0d\x0aSQLshutdownimmediate\x0d\x0aDatabaseclosed.\x0d\x0aDatabasedismounted.\x0d\x0aORACLEinstanceshutdown.\x0d\x0a\x0d\x0a4.启动数据库到mount状态\x0d\x0aSQLstartupmount\x0d\x0aORACLEinstancestarted.\x0d\x0aTotalSystemGlobalArea205520896bytes\x0d\x0aFixedSize1266608bytes\x0d\x0aVariableSize100666448bytes\x0d\x0aDatabaseBuffers100663296bytes\x0d\x0aRedoBuffers2924544bytes\x0d\x0aDatabasemounted.\x0d\x0a\x0d\x0a5.限制session\x0d\x0aSQLaltersystemenablerestrictedsession;\x0d\x0aSystemaltered.\x0d\x0a\x0d\x0a6.查询相关参数并修改\x0d\x0aSQLshowparameterjob_queue_processes;\x0d\x0aNAMETYPEVALUE\x0d\x0a-----------------------------------------------------------------------------\x0d\x0ajob_queue_processesinteger10\x0d\x0a\x0d\x0aSQLshowparameteraq_tm_processes;\x0d\x0aNAMETYPEVALUE\x0d\x0a-----------------------------------------------------------------------------\x0d\x0aaq_tm_processesinteger0\x0d\x0a\x0d\x0aSQLaltersystemsetjob_queue_processes=0;\x0d\x0aSystemaltered.\x0d\x0a\x0d\x0a7.打开数据库\x0d\x0aSQLalterdatabaseopen;\x0d\x0aDatabasealtered.\x0d\x0a\x0d\x0a8.修改字符集\x0d\x0aSQLalterdatabasecharactersetZHS16GBK;\x0d\x0aalterdatabasecharactersetZHS16GBK\x0d\x0a*\x0d\x0aERRORatline1:\x0d\x0aORA-12712:newcharactersetmustbeasupersetofoldcharacterset\x0d\x0a\x0d\x0a出现错误提示,新字符集必须是老字符集的超集,也就原来字符集是新字符集的子集,可以再Oracle官方文档上查询字符集包含关系。下面使用Oracle内部命令internal_use,跳过超集检查,生产环境不建议使用此方法。\x0d\x0a\x0d\x0aSQLalterdatabasecharactersetinternal_useZHS16GBK;\x0d\x0aDatabasealtered.\x0d\x0a\x0d\x0a9.查询当前字符集\x0d\x0aSQLselect*fromnls_database_parameterswhereparameter='NLS_CHARACTERSET';\x0d\x0aPARAMETERVALUE\x0d\x0a--------------------------------------------------------------------------------\x0d\x0aNLS_CHARACTERSETZHS16GBK\x0d\x0a\x0d\x0a10.关闭数据库\x0d\x0aSQLshutdownimmediate\x0d\x0aDatabaseclosed.\x0d\x0aDatabasedismounted.\x0d\x0aORACLEinstanceshutdown.\x0d\x0a\x0d\x0a11.启动数据库到mount状态\x0d\x0aSQLstartupmount\x0d\x0aORACLEinstancestarted.\x0d\x0aTotalSystemGlobalArea205520896bytes\x0d\x0aFixedSize1266608bytes\x0d\x0aVariableSize100666448bytes\x0d\x0aDatabaseBuffers100663296bytes\x0d\x0aRedoBuffers2924544bytes\x0d\x0aDatabasemounted.\x0d\x0a\x0d\x0a12.将相关参数改回原来值\x0d\x0aSQLaltersystemsetjob_queue_processes=10;\x0d\x0aSystemaltered.\x0d\x0a\x0d\x0a13.打开数据库\x0d\x0aSQLalterdatabaseopen;\x0d\x0aDatabasealtered.
专业领域包括网站设计制作、网站建设、购物商城网站建设、微信营销、系统平台开发, 与其他网站设计及系统开发公司不同,创新互联建站的整合解决方案结合了帮做网络品牌建设经验和互联网整合营销的理念,并将策略和执行紧密结合,为客户提供全网互联网整合方案。
oracle网站英文版怎么变成中文
两种方法,
1,找找看有没有中文版连接
2。用google的网页翻译。
怎么设置oracle的中文乱码
在Redhat上安装Oracle 10g没有设定字符集,采用的是操作系统默认字符集:WE8ISO8859P1,将字符集修改为:ZHS16GBK。由于过程不可逆,首先需要备份数据库。
1.数据库全备
2.查询当前字符集
SQL select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET WE8ISO8859P1
3.关闭数据库
SQL shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
4.启动数据库到mount状态
SQL startup mount
ORACLE instance started.
Total System Global Area 205520896 bytes
Fixed Size 1266608 bytes
Variable Size 100666448 bytes
Database Buffers 100663296 bytes
Redo Buffers 2924544 bytes
Database mounted.
5.限制session
SQL alter system enable restricted session;
System altered.
6.查询相关参数并修改
SQL show parameter job_queue_processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 10
SQL show parameter aq_tm_processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
SQL alter system set job_queue_processes=0;
System altered.
7.打开数据库
SQL alter database open;
Database altered.
8.修改字符集
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
出现错误提示,新字符集必须是老字符集的超集,也就原来字符集是新字符集的子集,可以再Oracle官方文档上查询字符集包含关系。下面使用Oracle内部命令internal_use,跳过超集检查,生产环境不建议使用此方法。
SQL alter database character set internal_use ZHS16GBK;
Database altered.
9.查询当前字符集
SQL select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET ZHS16GBK
10.关闭数据库
SQL shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
11.启动数据库到mount状态
SQL startup mount
ORACLE instance started.
Total System Global Area 205520896 bytes
Fixed Size 1266608 bytes
Variable Size 100666448 bytes
Database Buffers 100663296 bytes
Redo Buffers 2924544 bytes
Database mounted.
12.将相关参数改回原来值
SQL alter system set job_queue_processes=10;
System altered.
13.打开数据库
SQL alter database open;
Database altered.
怎样让Oracle支持中文
怎样让Oracle支持中文
需要修改字符集。
Oracle修改服务器端字符集:
SQLSHUTDOWN IMMEDIATE;
SQLSTARTUP MOUNT;
SQLALTER SYSTEM ENABLE RESTRICTED SESSION;
SQLALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQLALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQLALTER DATABASE OPEN;
SQLALTER DATABASE CHARACTER SET ZHS16GBK;
当前文章:怎么设置中文ORACLE 怎么设置中文版式
文章地址:http://lswzjz.com/article/hpgecd.html