该错误发生在数据库DBCA建库的时候。
具体错误如下:

发生该错误的时候,后台日志会如下显示:
OUI的日志:

INFO: Read: 35% complete
WARNING: Skipping line: 35% complete
INFO: Read: 38% complete
WARNING: Skipping line: 38% complete
INFO: Read: DBCA Operation failed.
INFO: DBCA Operation failed.
WARNING: Skipping line: DBCA Operation failed.
INFO: Read: Look at the log file "/home/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
INFO: Look at the log file "/home/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
WARNING: Skipping line: Look at the log file "/home/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
INFO: Completed Plugin named: Oracle Database Configuration Assistant
INFO: Oracle Database Configuration Assistant failed.
INFO: Oracle Database Configuration Assistant failed.
INFO: ConfigClient.executeToolsInAggregate action performed
INFO: Exiting ConfigClient.executeToolsInAggregate method

OUI的日志中,提示的更详细的日志信息:

[root@ora12c-1 ~]# cat /home/app/oracle/cfgtoollogs/dbca/orcl/orcl.log
[ 2017-03-08 11:36:54.527 CST ] Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 13%
DBCA_PROGRESS : 25%
[ 2017-03-08 11:38:39.475 CST ] Creating and starting Oracle instance
DBCA_PROGRESS : 26%
DBCA_PROGRESS : 30%
DBCA_PROGRESS : 31%
DBCA_PROGRESS : 35%
[ 2017-03-08 11:41:35.919 CST ] ORA-12705: Cannot access NLS data files or invalid environment specified

DBCA_PROGRESS : 38%
[ 2017-03-08 11:41:35.959 CST ] ORA-12705: Cannot access NLS data files or invalid environment specified

[ 2017-03-08 11:41:35.998 CST ] ORA-12705: Cannot access NLS data files or invalid environment specified

[ 2017-03-08 11:41:36.088 CST ] ORA-12705: Cannot access NLS data files or invalid environment specified

[ 2017-03-08 11:41:41.153 CST ] Error while executing "/home/app/oracle/12c/release_2/db_1/rdbms/admin/dbmssml.sql". Refer to "/home/app/oracle/cfgtoollogs/dbca/orcl/dbmssml0.log" for more details. Error in Process: /home/app/oracle/12c/release_2/db_1/perl/bin/perl
[ 2017-03-08 11:41:41.572 CST ] DBCA_PROGRESS : DBCA Operation failed.
[root@ora12c-1 ~]# 

可以看到,错误为【ORA-12705: Cannot access NLS data files or invalid environment specified】

检查NLS相关的环境变量的配置:

[root@ora12c-1 ~]# su - oracle
Last login: Wed Mar  8 11:10:04 CST 2017 on pts/2
[oracle@ora12c-1 ~]$ env | grep NLS_LANG
NLS_LANG=AMERICAN_AMERICA_ZHS16GBK
[oracle@ora12c-1 ~]$ 

可以看到,NLS_LANG的环境变量配置不正确。

修改正确:

[oracle@ora12c-1 ~]$ cat ~/.bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

# for oracle database 12c release 2
export ORACLE_BASE=/home/app/oracle
export ORACLE_HOME=$ORACLE_BASE/12c/release_2/db_1

export ORACLE_SID=smo_king

export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin

export EDITOR=vi

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
[oracle@ora12c-1 ~]$ 
[oracle@ora12c-1 ~]$ source .bash_profile 
[oracle@ora12c-1 ~]$ env | grep NLS_LANG
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
[oracle@ora12c-1 ~]$ 

然后,【retry】就没问题了。

————————————————————
Done。

说点什么

avatar

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

  Subscribe  
提醒