日期:2014-05-16  浏览次数:21807 次

ORA-01119: error in creating database file ***
今天在运行amx-bpm deploy-bpm的脚本时遇到了这个错误

setup-target-instance:
      [sql] Executing resource: /home/michael/amx-bpm20-conf/tibco/data/bpm/database/admin/setup-admin.sql
      [sql] Failed to execute:  CREATE TEMPORARY TABLESPACE bpm_tablespace_temp TEMPFILE 'bpm_tablespace_temp.dbf' size 100M AUTOEXTEND ON

BUILD FAILED
/home/michael/amx-bpm20-conf/tibco/data/tct/bpm/2013-02-20-11-04-18/scripts/build.xml:47: The following error occurred while executing this line:
/home/michael/amx-bpm20/bpm/2.0/scripts/instance-mgmt.xml:685: The following error occurred while executing this line:
/home/michael/amx-bpm20/bpm/2.0/scripts/instance-mgmt.xml:679: The following error occurred while executing this line:
/home/michael/amx-bpm20/bpm/2.0/scripts/database/build.xml:400: The following error occurred while executing this line:
/home/michael/amx-bpm20/bpm/2.0/scripts/database/build.xml:65: java.sql.SQLException: ORA-01119: error in creating database file 'bpm_tablespace_temp.dbf'
ORA-27038: created file already exists
OSD-04010: <create> option specified, file already exists



Total time: 7 seconds


看样子是oracle bpm_tablespace_temp.dbf已经创建过, 可我是第一次运行啊, 于是去运行脚本的客户端的各个文件夹下都没找到这个文件, 于是觉得这个应该是在oracle server的目录下, 让DBA帮我一搜, 果然在oracle的目录下有这个文件, 应该属于db files, 说明以前还是有人创建过, 所以命名冲突了. 于是把服务器端的文件重新命名, 或把客户端/home/michael/amx-bpm20-conf/tibco/data/bpm/database/admin/setup-admin.sql这个文件里SQL的文件命名改一下,


CREATE TEMPORARY TABLESPACE bpm_tablespace_temp TEMPFILE 'bpm_tablespace_temp.dbf' size 100M AUTOEXTEND ON;
CREATE TABLESPACE bpm_tablespace DATAFILE 'bpm_tablespace.dbf' size 512M AUTOEXTEND ON;



就pass了. 关于oracle表空间的介绍这里就不赘述了.