今天手工建立10G資料庫失敗,報ORA-12701錯誤

empo007發表於2010-01-18

SQL> CREATE DATABASE oam
2 USER SYS IDENTIFIED BY ORACLE
3 USER SYSTEM IDENTIFIED BY oracle
4 CONTROLFILE REUSE
5 logfile group 1 ('/ocs/oracle/ocs/oracle/oradata/oam/redo1.log') size 200M,
6 group 2 ('/ocs/oracle/ocs/oracle/oradata/oam/redo2.log') size 200M,
7 group 3 ('/ocs/oracle/ocs/oracle/oradata/oam/redo3.log') size 200M
8 MAXLOGFILES 5
9 MAXLOGMEMBERS 5
10 MAXLOGHISTORY 1
11 MAXDATAFILES 100
12 MAXINSTANCES 1
13 CHARACTER SET ZHS16GBK
14 NATIONAL CHARACTER SET AL16UTF16
15 datafile '/ocs/oracle/ocs/oracle/oradata/oam/system.dbf'
16 size 2048M autoextend on extent management local
17 sysaux datafile '/ocs/oracle/ocs/oracle/oradata/oam/sysaux.dbf'
18 size 2048M autoextend on
19 undo tablespace undotbs1
20 datafile '/ocs/oracle/ocs/oracle/oradata/oam/undo.dbf' size 2048M
21 default temporary tablespace temp
22 tempfile '/ocs/oracle/ocs/oracle/oradata/oam/temp.dbf' size 2048M;
NATIONAL CHARACTER SET AL16UTF16
*
ERROR at line 14:
ORA-12701: CREATE DATABASE character set is not known

檢查發現是環境變數ORA_NLS10設定錯誤導致:

[@more@]

查詢檢視v$nls_valid_values,發現支援的字符集只有US7ASCII,顯然不可能,進一步檢查發現環境變數ORA_NLS10設定錯誤,修改後錯誤沒有再出現。

ORA_NLS10=$ORACLE_HOME/nls/data

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/85922/viewspace-1030680/,如需轉載,請註明出處,否則將追究法律責任。

相關文章