高级搜索 返回首页  
名人名言
技术文章
    - LINUX文章
袍江主页技术文章ORACLE 修改字符集
ORACLE 修改字符集
2020-08-21 12:31:30
by ORACLE 修改字符集  
Rating: less than 3 votes
1 2 3 4 5 6 7 8 9 10

ORACLE 修改字符集

1.cmd

2.输入set ORACLE_SID=你想进入的数据库的那个sid

3.输入 sqlplus /nolog

4.将数据库启动到RESTRICTED模式下做字符集更改: 

SQL> conn /as sysdba 

Connected. 

SQL> shutdown immediate; 

Database closed. 

Database dismounted. 

ORACLE instance shut down. 

SQL> startup mount 

ORACLE instance started. 

Total System Global Area  236000356 bytes 

Fixed Size                   451684 bytes 

Variable Size             201326592 bytes 

Database Buffers           33554432 bytes 

Redo Buffers                 667648 bytes 

Database mounted. 

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

ALTER DATABASE CHARACTER SET ZHS16GBK 

ERROR at line 1: 

ORA-12712: new character set must be a superset of old character set 

提示我们的字符集:新字符集必须为旧字符集的超集,这时我们可以跳过超集的检查做更改: 

SQL> ALTER DATABASE character set INTERNAL_USE ZHS16GBK; 

Database altered. 

SQL> select * from v$nls_parameters; 

略 

19 rows selected. 

重启检查是否更改完成: 

SQL> shutdown immediate; 

Database closed. 

Database dismounted. 

ORACLE instance shut down. 

SQL> startup 

ORACLE instance started. 

Total System Global Area  236000356 bytes 

Fixed Size                   451684 bytes 

Variable Size             201326592 bytes 

Database Buffers           33554432 bytes 

Redo Buffers                 667648 bytes 

Database mounted. 

Database opened. 

SQL> select * from v$nls_parameters; 

 

select * from v$nls_parameters where parameter in  ( 'NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET','NLS_NCHAR_CHARACTERSET');  

 

推荐给好??? 打包下载这篇文章 打印这篇文章

Copyright © 2002 myarticle.com.cn
All rights reserved.

备案号:浙ICP备17002154号-1 Powered by: MyArticle Version 1.0dev
Processed Time: 0.0026 s Querys: 5 [ Gzip Level 0 ]