查看当前字符集SQL语句:
select * from nls_database_parameters where parameter =‘NLS_CHARACTERSET‘;
修改字符集操作如下,首先用sysdba角色登录:
conn sys/管理员密码 as sysdba
然后在sqlplus界面依次执行以下sql语句:
若此时数据库服务器已启动,则先执行SHUTDOWN IMMEDIATE命令关闭数据库服务器,然后仔细逐条执行以下命令:
SQL>STARTUP 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>ALTER DATABASE national CHARACTER SET INTERNAL ZHS16GBK;
//执行后出错ORA-00933: SQL 命令未正确结束,不用理会。
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP: