Oracle 乱码
时间:2021-07-01 10:21:17
帮助过:2人阅读
userenv(
‘language‘)
from dual;
-修改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 area 135337420 bytes
fixed size 452044 bytes
variable size 109051904 bytes
database buffers
25165824 bytes
redo buffers 667648 bytes
database mounted.
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 ZHS16GBK;
sql> shutdown immediate;
sql> startup;
修改完成之后
sql> drop user xxxx cascade;
重新创建用户,重新导dmp
2. 数据库无乱码问题,但是在WEB服务器用PL/SQL查询时,中文乱码
设置WEB服务器变量
NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK
重新打开PL/SQL,问题解决
3. 导入DMP之后,表数据无乱码,存储过程中文乱码
此问题原因是因为导入DMP时,Linux服务器为英文环境,它会自己先读一遍,然后才保存;
在服务器安装中文字体,ORACLE用户登录时使用中文环境,重新导入DMP文件即可
Oracle 乱码
标签: