YohLee / Learning

学习资料
2 stars 0 forks source link

Oracle 改服务器端字符集__value too long #17

Open YohLee opened 4 years ago

YohLee commented 4 years ago

2、改服务器端字符集,通过ORACLE的SQL PLUS命令窗口改

在SQL*PLUS 中,以DBA登录

conn 用户名 as sysdba

然后执行以下命令

shutdown immediate; (把database停了)

startup mount; (把database重开去可更改情況)

alter system enable restricted session;

alter system set job_queue_processes=0;

alter system set aq_tm_processes=0;

alter database open;

alter database character set utf8;

OR

alter database character set internal_use utf8;

shutdown immediate;

startup; (重开正常oracle)

############value too long################ (1) 切换需要启动的数据库实例:export ORACLE_SID=C1 ##########如果报错,从第二步开始 (2) 进入Sqlplus控制台,命令:sqlplus /nolog (3) 以系统管理员登录,命令:connect / as sysdba (4) 如果是关闭数据库,命令:shutdown immediate (5) 启动数据库,命令:startup (6) 退出sqlplus控制台,命令:exit

SQL>SHUTDOWN IMMEDIATE SQL>STARTUP MOUNT SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION; SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0; SQL>ALTER SYSTEM SET AQ_TM_PROCESSES=0; SQL>ALTER DATABASE OPEN; SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK; --设置INTERNAL_USE指令不对字符集超集进行检查: SQL>SHUTDOWN IMMEDIATE SQL>STARTUP