oracle 修改字符集支持中文

时间:2023-03-09 21:33:13
oracle 修改字符集支持中文

1.登录sys关闭服务

 [oracle@t-e ~]$ export ORACLE_SID=kamiltest1
[oracle@t-e ~]$ sqlplus / as sysdba
SQL>shutdown immediate ;

2.修改字符集

 SQL > startup mount ;
SQL > alter system enable restricted session ;
SQL > alter system set JOB_QUEUE_PROCESSES=;
SQL > alter system set AQ_TM_PROCESSES=;
SQL > alter database open ;
SQL > alter database character set INTERNAL_USE ZHS16GBK;
#alter database character set INTERNAL_USE ZHS16GBK;
SQL > shutdown immediate ;
SQL > startup ;

3.建议重启整个oracle服务

lsnrctl stop
ps -ef|grep $ORACLE_SID|grep -v ora_|grep LOCAL=NO|awk '{print $2}'|xargs kill
#关闭监控,kill oracle session

关闭

 sqlplus /nolog
connect / as sysdba
shutdown immediate"
exit
#退出sqlplus。
 lsnrctl start
sqlplus /nolog

启动

connect / as sysdba
startup