dbms_output输出中文乱码
原因:客户端与服务端编码不一致
修改服务器编码:
SQL> conn /as sysdba;
SQL>select userenv('language') from dual; --查看服务端字符集
SQL>SHUTDOWN IMMEDIATE --关闭数据库
SQL>STARTUP MOUNT --启动到 Mount
SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL>ALTER DATABASE OPEN;
SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP;
SQL>select userenv('language') from dual; --查看服务端字符集
参考博客:https://www.cnblogs.com/zxg-6/p/9771530.html