改 NLS_CHARACTERSE 方法
2013-07-29 23:29
要更改NLS_CHARACTERSET的值, 例如要改成 AL32UTF8 , 步驟如下:
以 sysdba 角色進入 sqlplus 之後執行以下
shutdown immediate;
STARTUP MOUNT;
ALTER SESSION SET SQL_TRACE=TRUE;
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 INTERNAL_USE AL32UTF8;
ALTER SESSION SET SQL_TRACE=FALSE;
shutdown immediate;
STARTUP;
檢查是否已變更:
SQL> column PARAMETER format a30
SQL> column VALUE format a10
SQL> SELECT parameter, value FROM v$nls_parameters WHERE parameter LIKE '%CHARACTERSET';
PARAMETER VALUE
------------------------------ ----------
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16