linux下修改oracle 10G 字符集
修改oracle 10G 字符集由于刚刚建立的数据库字符集是: WE8ISO8859P1 想导入数据是导入不了的,所以需要修改字符集。
编辑
export ORACLE_SID=UCIT (数据库SID)
sqlplus '/as sysdba'
select name,value$ from props$ where name like '%NLS%'; 查看数据库字符集 NLS_CHARACTERSET 就是数据库字符集
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP MOUNT;
SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
SQL>ALTER DATABASE OPEN;
SQL>ALTER DATABASE CHARACTER SET ZHS16GBK;
如果出现了 ERROR at line 1: ORA-12712: new character set must be a superset of old character set
SQL> ALTER DATABASE character set INTERNAL_USE zhs16gbk; # 使用INTERNAL_USE可以跳过超集的检查,
ALTER DATABASE character set INTERNAL_USE
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP 再检查就发现已经把字符集修整过来了。