# 关闭数据库
shut immediate
# 以mount打开
startup mount;
# 设置session
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 ZHS16GBK;
# 可能会遇到的错误:ORA-12712: new character set must be a superset of old character set
# 解决办法
ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
# 关闭
shut immediate
# 重启
startup;
# 查看当前字符集
SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';
SELECT USERENV('language') FROM DUAL;