怎么设置oracle的中文乱码在Redhat上安装Oracle 10g没有设定字符集 , 采用的是操作系统默认字符集:WE8ISO8859P1,将字符集修改为:ZHS16GBK 。由于过程不可逆,首先需要备份数据库 。
1.数据库全备
2.查询当前字符集
SQL select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETERVALUE
【oracle怎么改乱码 oracle数据库更改字符集乱码】---------------------------------------- ----------------------------------------
NLS_CHARACTERSETWE8ISO8859P1
3.关闭数据库
SQL shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
4.启动数据库到mount状态
SQL startup mount
ORACLE instance started.
Total System Global Area205520896 bytes
Fixed Size1266608 bytes
Variable Size100666448 bytes
Database Buffers100663296 bytes
Redo Buffers2924544 bytes
Database mounted.
5.限制session
SQL alter system enable restricted session;
System altered.
6.查询相关参数并修改
SQL show parameter job_queue_processes;
NAMETYPEVALUE
------------------------------------ ----------- ------------------------------
job_queue_processesinteger10
SQL show parameter aq_tm_processes;
NAMETYPEVALUE
------------------------------------ ----------- ------------------------------
aq_tm_processesinteger0
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';
PARAMETERVALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSETZHS16GBK
10.关闭数据库
SQL shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
11.启动数据库到mount状态
SQL startup mount
ORACLE instance started.
Total System Global Area205520896 bytes
Fixed Size1266608 bytes
Variable Size100666448 bytes
Database Buffers100663296 bytes
Redo Buffers2924544 bytes
Database mounted.
12.将相关参数改回原来值
SQL alter system set job_queue_processes=10;
System altered.
13.打开数据库
SQL alter database open;
Database altered.
oracle数据库乱码怎么解决一、pl/sql developer 中文字段显示乱码
原因:因为数据库的编号格式和pl /sql developer的编码格式不统一造成的 。
二、查看和修改oracle数据库字符集:
select userenv('language') from dual;
查询结果:
SIMPLIFIED CHINESE_CHINA.AL32UTF8
--修改oracle数据库字符集:(在SQL Plus中)
sql conn / as sysdba;
sql shutdown immediate;
database closed.
database dismounted.
oracle instance shut down.
sql startup mount;
oracle instance started.
total system global area135337420 bytes
fixed size452044 bytes
variable size109051904 bytes
database buffers25165824 bytes
redo buffers667648 bytes
database mounted.
sql alter system enable restricted session;
system altered.
sql alter system set job_queue_processes=0;
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怎么改乱码的介绍就聊到这里吧 , 感谢你花时间阅读本站内容 , 更多关于oracle数据库更改字符集乱码、oracle怎么改乱码的信息别忘了在本站进行查找喔 。
推荐阅读
- 中视频搞笑领域是什么,搞笑的视频是什么意思
- 如何挑选电商课程呢,如何挑选电商课程呢知乎
- voxakuma直播回放b站,wb直播回放
- hbasejava代码 hbase_classpath
- linux中z的命令,linux cz命令
- html5菜单样式代码,html菜单页面代码
- oracle查询用户的密码,oracle查询用户密码过期时间
- go语言基础教学视频 go语言入门指南
- 网赌推广如何做最安全,网赌推广按什么量刑