Chinaunix首页 | 论坛 | 博客
  • 博客访问: 475750
  • 博文数量: 111
  • 博客积分: 3146
  • 博客等级: 中校
  • 技术积分: 939
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-07 11:23
个人简介

Nathing

文章分类

全部博文(111)

文章存档

2016年(2)

2015年(1)

2014年(31)

2012年(2)

2011年(9)

2010年(36)

2009年(30)

我的朋友

分类: Oracle

2014-04-03 23:58:06

今天安装了oracle11g数据库,安装完毕后发现数据的字符集不是常用的utf8,所以决定修改:
下面是修改的过程,记录一下:

SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.WE8MSWIN1252

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  688959488 bytes
Fixed Size    2216544 bytes
Variable Size  440405408 bytes
Database Buffers  239075328 bytes
Redo Buffers    7262208 bytes
Database mounted.
SQL> alter session set sql_trace=true;
Session altered.
SQL> alter system enable restricted session;
System altered.
SQL> alter system set job_queue_processes=0;
System altered.
SQL> alter system set aq_tm_processes=0;
System altered.
SQL> alter database open;
Database altered.
SQL> alter database character set utf-8;
alter database character set utf-8
                              *
ERROR at line 1:
ORA-00933: SQL command not properly ended

SQL> alter database character set internal_use utf8;
Database altered.
SQL> update props$ set value$='utf8' where name='nls_nchar_characterset';
0 rows updated.
SQL> shutdown immediate;
ORA-01097: cannot shutdown while in a transaction - commit or rollback first
SQL> commit;
Commit complete.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area  688959488 bytes
Fixed Size    2216544 bytes
Variable Size  440405408 bytes
Database Buffers  239075328 bytes
Redo Buffers    7262208 bytes
Database mounted.
Database opened.
SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.UTF8

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