安装时有时候字符集没设置对会显示乱码,这是就要修改字符集
查看字符集,当前是AL32UTF8
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
SIMPLIFIED CHINESE_CHINA.AL32UTF8
关闭数据库,然后启动到mount状态
SQL> shutdown immediate;
????????
????????
ORACLE ???????
SQL> startup mount;
ORACLE ???????
Total System Global Area 4949275392 bytes
Fixed Size 9696000 bytes
Variable Size 889192448 bytes
Database Buffers 4043309056 bytes
Redo Buffers 7077888 bytes
????????
开启限制会话模式
ALTER SYSTEM ENABLE RESTRICTED SESSION;
--ALTER SYSTEM DISABLE RESTRICTED SESSION; #取消限制会话模式
设定job队列可以启动的进程数
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
说明:JOB_QUEUE_PROCESSES=0,则DBMS_JOB作业和Oracle Scheduler作业将不会在实例上运行。参考:https://blog.csdn.net/leshami/article/details/8694772
禁用队列监视器协调器
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
修改并打开数据库
ALTER DATABASE OPEN;
修改数据库字符集
ALTER DATABASE CHARACTER SET ZHS16GBK;
当提示我们:新字符集必须为旧字符集的超集合,使用以下命令:
ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
查看一下,已经修改好了
SQL> select * from v$nls_parameters;
重启一下数据库
已经改过来了
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
发表评论