目前,Oracle 10g XE的缺省字符集不是中文字符集,并且不能通过直接运行 alter database character set ZHS16GBK ; 来修改,因为ZHS16GBK不是缺省字符集的超集。过去流传很广的直接修改sys用户下的PROPS$表的方法,也会给字符集的变更留下很多潜在的问题.
不过在安装完Oracle XE后,可以在sqlplus(即Oracle XE的run SQL command line)中, 进行如下的操作来修改字符集:
connect system/system as sysdba (输入system用户名跟密码)
shutdown immediate
startup mount
alter system enable restricted session ;
alter database open ;
alter database character set internal_use ZHS16GBK ;
shutdown immediate
startup
这样字符集的修改就完成了。
在修改完字符集之后,打开数据库主页,有可能会出现乱码。因为大家的浏览器默认为中文的字符集,并且排在第一位。
方法:
打开IE浏览器的工具--Internet--语言按钮:
添加一个语种:英语(美国),并将它上移到最上面,这样 再打开数据库的主页,便已经变成了英文显示了,不会再乱码了。
注:这个只在windows下有效,linux下好象不行。 :o
不过在安装完Oracle XE后,可以在sqlplus(即Oracle XE的run SQL command line)中, 进行如下的操作来修改字符集:
connect system/system as sysdba (输入system用户名跟密码)
shutdown immediate
startup mount
alter system enable restricted session ;
alter database open ;
alter database character set internal_use ZHS16GBK ;
shutdown immediate
startup
这样字符集的修改就完成了。
在修改完字符集之后,打开数据库主页,有可能会出现乱码。因为大家的浏览器默认为中文的字符集,并且排在第一位。
方法:
打开IE浏览器的工具--Internet--语言按钮:
添加一个语种:英语(美国),并将它上移到最上面,这样 再打开数据库的主页,便已经变成了英文显示了,不会再乱码了。
注:这个只在windows下有效,linux下好象不行。 :o