oracle字符集修改(AL32UTF8->UTF8)_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 1115 | 回复: 0   主题: oracle字符集修改(AL32UTF8->UTF8)        下一篇 
derek
注册用户
等级:中校
经验:1550
发帖:209
精华:0
注册:2011-7-21
状态:离线
发送短消息息给derek 加好友    发送短消息息给derek 发消息
发表于: IP:您无权察看 2015-5-19 14:49:02 | [全部帖] [楼主帖] 楼主

AL32UTF8->UTF8

步骤

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

alter session set sql_trace=false;

shutdown immediate;

startup;

[root@detaildb ~]# su - oracle

[oracle@detaildb ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.2.0 Production on Fri Apr 6 09:55:53 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

修改之前的字符集

SQL> select * from v$nls_parameters where parameter='NLS_CHARACTERSET';

PARAMETER                       VALUE

----------------- ----------------------------

NLS_CHARACTERSET                AL32UTF8

SQL>

开始修改

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size                  2226912 bytes

Variable Size             402654496 bytes

Database Buffers         1191182336 bytes

Redo Buffers                7348224 bytes

Database mounted.

SQL> alter session set sql_trace=true;

Session altered.

SQL> alter system enable restricted session;

System altered.

SQL> show parameter job_queue_process

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

job_queue_processes                  integer     1000

SQL> alter system set job_queue_processes=0;

System altered.

SQL> show parameter aq_tm_processes

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

aq_tm_processes                      integer     0

SQL> alter database open;

Database altered.

SQL> alter database character set internal_use utf8;

Database altered.

SQL> alter session set sql_trace=flase;

alter session set sql_trace=flase

*

ERROR at line 1:

ORA-00922: missing or invalid option

SQL> alter session set sql_trace=false;

Session altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size                  2226912 bytes

Variable Size             402654496 bytes

Database Buffers         1191182336 bytes

Redo Buffers                7348224 bytes

Database mounted.

Database opened.

SQL>

修改之后的字符集

SQL> select * from v$nls_parameters where parameter='NLS_CHARACTERSET';

PARAMETER                       VALUE

----------------- ----------------------------

NLS_CHARACTERSET                UTF8

SQL>

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论