操作系统是suse linux enterprise desktop 10,oracle是 10g。
suse有的中文显示问号。oracle插入中文后查询得到的是问号。
suse下RC_LANG和RC_LC_ALL是zh_CN.GB2312.
oracle通过select name,value$ from props$ where name like '%NLS%';
查的NLS_NCHAR_CHARACTERSET
AL16UTF16
启动监听后,通过sqlplus / as sysdba登陆oracle,执行如下:
startup;
shutdown immediate;
startup mount;
alter system enable restricted session;
alter system set job_queue_processes=0;
alter database open;
alter database character set internal_convert zhs16gbk;
可是改不过来,请高手指教。
suse linux下oracle中文显示成问号,怎样修改oracle编码
答案:4 悬赏:70 手机版
解决时间 2021-02-19 14:28
- 提问者网友:姑娘长的好罪过
- 2021-02-19 04:01
最佳答案
- 五星知识达人网友:你哪知我潦倒为你
- 2021-02-19 04:39
可以通过以下固定用法实现:
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 CHINESE_CHINA.AL32UTF8;
sql> shutdown immediate;
sql> startup;
备注:具体的编码格式根据实际需要修改即可,推荐UTF-8(默认是GBK)。
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 CHINESE_CHINA.AL32UTF8;
sql> shutdown immediate;
sql> startup;
备注:具体的编码格式根据实际需要修改即可,推荐UTF-8(默认是GBK)。
全部回答
- 1楼网友:妄饮晩冬酒
- 2021-02-19 06:20
重新创建一个数据库,选择ZHS16GBK呢?
- 2楼网友:廢物販賣機
- 2021-02-19 05:57
第一步:切换到oracle数据库用户:su oracle ,之后输入password,即可完成切换。
第二步:输入”sqlplus“即可进入命令行。
第三步:输入”conn zhangsan/zhangsan“即可登录”zhangsan"用户。
解释:linux系统和windows系统的sqlplus命令行是一样的,没有区别,不同的是linux下必须登录到相应的权限用户下,才可以操作数据库。
- 3楼网友:詩光轨車
- 2021-02-19 05:22
utf8:
ALTER DATABASE `数据库` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
ALTER TABLE `数据表` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
gbk (包含gb2312):
ALTER DATABASE `数据库` DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci
ALTER TABLE `数据表` DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯