如何修改Oracle字符集
来源:互联网 发布:seo分析 编辑:程序博客网 时间:2024/05/29 16:59
在Redhat上安装Oracle 10g没有设定字符集,采用的是操作系统默认字符集:WE8ISO8859P1,将字符集修改为:ZHS16GBK。由于过程不可逆,首先需要备份数据库。1.数据库全备
2.查询当前字符集
SQL> select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET WE8ISO8859P1
3.关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
4.启动数据库到mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 205520896 bytes
Fixed Size 1266608 bytes
Variable Size 100666448 bytes
Database Buffers 100663296 bytes
Redo Buffers 2924544 bytes
Database mounted.
5.限制session
SQL> alter system enable restricted session;
System altered.
6.查询相关参数并修改
SQL> show parameter job_queue_processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
job_queue_processes integer 10
SQL> show parameter aq_tm_processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
SQL> alter system set job_queue_processes=0;
System altered.
7.打开数据库
SQL> alter database open;
Database altered.
8.修改字符集
SQL> alter database character set ZHS16GBK;
alter database character set ZHS16GBK
*
ERROR at line 1:
ORA-12712: new character set must be a superset of old character set
出现错误提示,新字符集必须是老字符集的超集,也就原来字符集是新字符集的子集,可以再Oracle官方文档上查询字符集包含关系。下面使用Oracle内部命令internal_use,跳过超集检查,生产环境不建议使用此方法。
SQL> alter database character set internal_use ZHS16GBK;
Database altered.
9.查询当前字符集
SQL> select * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET ZHS16GBK
10.关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
11.启动数据库到mount状态
SQL> startup mount
ORACLE instance started.
Total System Global Area 205520896 bytes
Fixed Size 1266608 bytes
Variable Size 100666448 bytes
Database Buffers 100663296 bytes
Redo Buffers 2924544 bytes
Database mounted.
12.将相关参数改回原来值
SQL> alter system set job_queue_processes=10;
System altered.
13.打开数据库
SQL> alter database open;
Database altered.
0 0
- 如何修改Oracle字符集
- 如何修改Oracle字符集
- 如何修改Oracle数据库字符集
- 如何修改oracle数据库字符集
- 如何查看查询oracle字符集、 修改设置字符集以及常见的oracle utf8字符集和oracle exp 字符集问题。
- ORACLE 字符集乱码 修改字符集
- Oracle字符集修改问题
- oracle 修改字符集
- Oracle修改字符集
- 修改oracle的字符集
- 修改oracle默认字符集
- oracle 修改字符集
- 修改oracle数据库字符集
- 修改oracle字符集
- Oracle字符集修改
- 修改ORACLE字符集
- 修改oracle字符集
- 修改oracle字符集
- 和大家一起分享几组Android游戏源码
- 一个科技公司受人尊敬的品质
- iOS四个方向的手势
- UIBtutton 个别翻译
- C语言中 %02X 是什么意思
- 如何修改Oracle字符集
- GTK编程基础----范围控件(比例控件、滚动条控件)
- tomcat虚拟目录配置
- IBM隐瞒美国间谍丑闻对中国业务影响遭起诉
- 东软实训推荐面试问题14:工作失误给公司造成经济损失你该怎么办?
- 海量数据杂
- thinkphp学习资源
- JAVA基础之String类
- DOM中node和element区别