oracle修改默认字符编码sql语句分享

发布时间:2019-11-12编辑:脚本学堂
本文介绍了oracle数据库默认字符集的修改方法,如何修改oracle数据库中的默认字符集,这里通过实例学习下。

修改oracle数据库默认字符集的sql语句
 

复制代码 代码示例:

--查看oracle数据库字符集:
select userenv('language') from dual;

--查询结果:
simplified chinese_china.al32utf8

--修改oracle数据库字符集:(在sql plus中)
sql> conn / as sysdba;
sql> shutdown immediate;
database closed.
database dislinuxjishu/9952.html target=_blank class=infotextkey>mounted.
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 al32utf8;
sql> shutdown immediate;
sql> startup;
--修改oracle用户的nls_lang
--编辑/home/oracle/.bash_profile
--bash代码
export nls_lang="simplified chinese_china.al32utf8"