重庆思庄Oracle、Redhat认证学习论坛

标题: 修改数据库字符集 [打印本页]

作者: denglj    时间: 2021-10-22 20:44
标题: 修改数据库字符集
修改数据库字符集步骤
#查看更改前字符集
SQL>select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
#关闭数据库
SQL>shutdown immediate;
Databaseclosed.
Databasedismounted.
ORACLEinstance shut down.
#启动到mount阶段
SQL>startup mount;
ORACLEinstance started.
TotalSystem Global Area 3221222464 bytes
FixedSize                  8901696 bytes
VariableSize            1744830464 bytes
DatabaseBuffers         1459617792 bytes
RedoBuffers                7872512 bytes
Databasemounted.
#将数据库处于restricted模式下
SQL>alter system enable restricted session;
Systemaltered.
#打开数据库
SQL>alter database open;
Databasealtered.
#修改字符集
SQL>alter database character set internal_use zhs16gbk;
Databasealtered.
#查看更改后字符集
SQL>select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK

数据库字符集由AMERICAN_AMERICA.AL32UTF8修改为AMERICAN_AMERICA.ZHS16GBK完毕.






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2