1.(Window:)cmd下输入set ORACLE_SID=你想进入的数据库的那个sid
(Linux:)切换到oracle用户:export ORACLE_SID=你想进入的数据库的那个sid
2.输入 sqlplus /nolog
3.将数据库启动到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;
sql>ALTER SYSTEM SET AQ_TM_PROCESSES=0;
sql>alter database open;
Database altered.
sql>ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
sql>ALTER DATABASE character set INTERNAL_USE AL32UTF8;
Database altered.
sql>select * from v$nls_parameters;
略
19 rows selected.
重启检查是否更改完成:
sql>startup
Database opened.
sql>select * from v$nls_parameters;
原文链接:https://www.f2er.com/oracle/207629.html