ORACLE11G 字符集更改(这里更改为AL32UTF8)

阅读更多
更改步骤:1、用sysdba角色用户登录sqlplus: 命令行输入:sqlplus sys as sysdba

               2、输入口令,进入sqlplus:sql>---

               3、依次键入下面的命令行执行:

                    shutdown immediate;
                    STARTUP MOUNT;
                    ALTER SESSION SET SQL_TRACE=TRUE;
                    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 INTERNAL_USE AL32UTF8;
                    ALTER SESSION SET SQL_TRACE=FALSE;
                    shutdown immediate;
                    startup;

风险分析:执行上述命令,有可能造成数据库中已有数据混乱的情况,所以在进行操作前,

               要进行数据库的备份操作;

结果查看:察看 NLS_LANG 信息:
               SELECT parameter, value FROM v$nls_parameters WHERE parameter LIKE '%CHARACTERSET';
              NLS_LANG 信息已经变成:


              NLS_CHARACTERSET
              AL32UTF8
              NLS_NCHAR_CHARACTERSET
              AL16UTF16


你可能感兴趣的:(sql,sys,alter,sqlplus,sysdba)