Chinaunix首页 | 论坛 | 博客
  • 博客访问: 265088
  • 博文数量: 34
  • 博客积分: 569
  • 博客等级: 中士
  • 技术积分: 380
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-10 14:10
文章分类

全部博文(34)

文章存档

2016年(6)

2014年(1)

2013年(5)

2012年(22)

我的朋友

分类: Oracle

2014-07-15 13:24:40

背景描述
    在cent os的英文环境下安装了oracle 10g,但是忘记调整字符集为GBK,导致最后安装的是ISO8859-1的字符集,很艰难的在centos上安装的数据库,不想重新安装,只能通过oracle自带的功能来修改字符集。

解决方法
    1、oracle用户登陆
  1. [root@itest1 cas-tomcat-7.0.11]# su oracle
  2. [oracle@itest1 cas-tomcat-7.0.11]$ sqlplus /nolog

  3. SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 15 11:34:54 2014

  4. Copyright (c) 1982, 2005, Oracle. All rights reserved.
   2、关闭数据库

  1. SQL> conn / as sysdba
  2. Connected.
  3. SQL> shutdown immediate
  4. Database closed.
  5. Database dismounted.
  6. ORACLE instance shut down.
   3、修改字符集

  1. SQL> startup mount
  2. ORACLE instance started.

  3. Total System Global Area 553648128 bytes
  4. Fixed Size 1220532 bytes
  5. Variable Size 163577932 bytes
  6. Database Buffers 385875968 bytes
  7. Redo Buffers 2973696 bytes
  8. Database mounted.
  9. SQL> alter system set JOB_QUEUE_PROCESSES=0;

  10. System altered.

  11. SQL> alter system set AQ_TM_PROCESSES=0;

  12. System altered.

  13. SQL> alter database open;

  14. Database altered.

  15. SQL> alter database character set INTERNAL_USE ZHS16GBK;

  16. Database altered.
  4、重启oracle

  1. SQL> shutdown immediate;
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.

  5. SQL> startup
  6. ORACLE instance started.

  7. Total System Global Area 553648128 bytes
  8. Fixed Size 1220532 bytes
  9. Variable Size 163577932 bytes
  10. Database Buffers 385875968 bytes
  11. Redo Buffers 2973696 bytes
  12. Database mounted.
  13. Database opened.

阅读(1378) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~