ORA-01119 ORA-27038 when create tablespace

在做LAB測試時,之前刪除tablespace忘了帶入including datafile,現在要建立新的tablespace時,datafile名稱已存在OS中

SQL> create tablespace testtbs datafile '/ACFS/ORCL1/TESTTBS.dbf' size 100M autoextend off;
create tablespace testtbs datafile '/ACFS/ORCL1/TESTTBS.dbf' size 100M autoextend off
*
ERROR at line 1:
ORA-01119: error in creating database file '/ACFS/ORCL1/TESTTBS.dbf'
ORA-27038: created file already exists
Additional information: 1

Solution :

a. reuse exists datafile

SQL> create tablespace testtbs datafile '/ACFS/ORCL1/TESTTBS.dbf' reuse autoextend off;

Tablespace created.

OR

b. delete os file and create tablespace

[oracle@db ~]$ rm -f /ACFS/ORCL1/TESTTBS.dbf

[oracle@db ~]$ sqlplus / as sysdba
SQL> create tablespace testtbs datafile '/ACFS/ORCL1/TESTTBS.dbf' size 100M autoextend off;

Tablespace created.

張貼留言

0 留言