首頁 >資料庫 >mysql教程 >修改Oracle 10g的字符集

修改Oracle 10g的字符集

WBOY
WBOY原創
2016-06-07 17:00:13899瀏覽

修改数据库字符集为:ZHS16GBK查看服务器端字符集SQL gt; select * from V$NLS_PARAMETERS;修改:$sqlplus /nologSQLgt;conn /

修改数据库字符集为:ZHS16GBK
查看服务器端字符集
SQL > select * from V$NLS_PARAMETERS;
修改:
$sqlplus /nolog
SQL>conn / as sysdba
若此时数据库服务器已启动,则先执行 SHUTDOWN IMMEDIATE 命
令关闭数据库服务器,,然后执行以下命令:
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 ZHS16GBK
若出现超集上面语句无法修改,需使用INTERNAL_USE可以跳过超集的检查:
SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;

ERROR at line 1:
ORA-12721: operation cannot execute when other sessions are active

若报以上错误则:select sid,serial#,username,machine from v$session;查看有哪些SESSION,然后

alter system kill session 'sid'serial#' immediate;然后

alter system kill session '158,7' immediate;如这样


SQL>ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16GBK;
SQL>SHUTDOWN IMMEDIATE
SQL>STARTUP

linux

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn