1.登录sys关闭服务
1 [oracle@t-e ~]$ export ORACLE_SID=kamiltest1 2 [oracle@t-e ~]$ sqlplus / as sysdba 3 SQL>shutdown immediate ;
2.修改字符集
1 SQL > startup mount ; 2 SQL > alter system enable restricted session ; 3 SQL > alter system set JOB_QUEUE_PROCESSES=0; 4 SQL > alter system set AQ_TM_PROCESSES=0; 5 SQL > alter database open ; 6 SQL > alter database character set INTERNAL_USE ZHS16GBK; 7 #alter database character set INTERNAL_USE ZHS16GBK; 8 SQL > shutdown immediate ; 9 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
关闭
1 sqlplus /nolog 2 connect / as sysdba 3 shutdown immediate" 4 exit 5 #退出sqlplus。
1 lsnrctl start 2 sqlplus /nolog
启动
connect / as sysdba
startup