oracle数据库更改字符集

Posted Sebastiane

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle数据库更改字符集相关的知识,希望对你有一定的参考价值。

在数据迁徙的时候需要使源和目标数据库的字符集、版本等信息统一……

这里是对一个数据库的设置,需要在两边进行同样的操作。

[email protected]> select userenv(‘language‘) from dual;

USERENV(‘LANGUAGE‘)
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK


[email protected]> startup mount
ORACLE instance started.
Total System Global Area 638853120 bytes
Fixed Size 2255952 bytes
Variable Size 255853488 bytes
Database Buffers 373293056 bytes
Redo Buffers 7450624 bytes
Database mounted.


[email protected]> ALTER SESSION SET SQL_TRACE=TRUE;
Session altered.
[email protected]> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
System altered.
[email protected]> ALTER SYSTEM SET AQ_TM_PROCESSES=0;
System altered.
[email protected]>
[email protected]>
[email protected]> ALTER SYSTEM ENABLE RESTRICTED SESSION;
System altered.


[email protected]> alter database open;
Database altered.
[email protected]> alter database character set internal_use WE8MSWIN1252;
Database altered.
[email protected]> alter system disable restricted session;
System altered.
[email protected]> execute sys.dbms_metadata_util.load_stylesheets;
PL/SQL procedure successfully completed.


[email protected]> select userenv(‘language‘) from dual;
USERENV(‘LANGUAGE‘)
--------------------------------------------------------------------------------
AMERICAN_AMERICA.WE8MSWIN1252

 

查看已经更改,这里需要把之前修改的参数改回去:


[email protected]> alter system set job_queue_processes=30 ;
System altered.
[email protected]> alter system set AQ_TM_PROCESSES=1;

重启(实验环境下强制重启)
[email protected]> startup force ;
ORACLE instance started.
Total System Global Area 638853120 bytes
Fixed Size 2255952 bytes
Variable Size 255853488 bytes
Database Buffers 373293056 bytes
Redo Buffers 7450624 bytes
Database mounted.
Database opened.

完成~













































以上是关于oracle数据库更改字符集的主要内容,如果未能解决你的问题,请参考以下文章

oracle更改数据库字符集

oracle数据库更改字符集

更改虚拟机上的oracle字符集

oracle怎么将表中字段的很长的字符串数据更改其中一两个字符

oracle 10如何修改字符集?

Oracle 数据库字符集