Oracle客户端的字符集和服务端要一致,否则会出现乱码问题。
更改客户端字符集
连接服务器,可以查询客户端设置:
select * from v$nls_parameters;
在环境变量里设置NLS_LANG = AMERICAN_AMERICA.UTF8
更改服务端字符集
通过命令窗口的sqlplus,以system用户登录,之后执行以下命令:
>conn 用户名 as sysdba; >shutdown immediate; >startup mount; >alter system enable restricted session; >alter system set job_queue_processes=0; >alter system set aq_tm_processes=0; >alter database open; >alter database character set utf8; OR >alter database character set internal_use utf8; >shutdown immediate; >startup;原文链接:https://www.f2er.com/oracle/208872.html