Oracle数据库编码转换,从AL32UTF8变为ZHS16GBK。

  1. 首先登录数据库,查看编码格式。

select userenv('language') from dual;

 

2、进入

 

3、开始输入命令了~

>conn sys/password as sysdba

>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 ZHS16GBK;

-------此处有报错提示!-----

ORA-12712: new character set must be a superset of old character set

RROR at line 1:

新字符集必须是老字符集的超集。

 

于是采用如下操作进行转换:

>ALTER DATABASE character set INTERNAL_USE ZHS16GBK;

>shutdown immediate;

>STARTUP;

到此为止问题解决~~~

 

ps:安装的oracle是oracle 11g,用conn / as sysdba登录时会提示“权限不足”。这时用 conn sys/webagent as sysdba可以登录。

你可能感兴趣的:(数据库,Oracle)