문제

so im trying to drop a tablespace temp with the command

DROP TABLESPACE temp INCLUDING CONTENTS;

but i get this error: tablespace 'temp' does not exist. however when i try and create the tablespace with this command

CREATE TEMPORARY TABLESPACE temp
TEMPFILE 'C:/Oracle/oradata/orcl/temp.dbf'
SIZE 400M REUSE
AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED EXTENT
MANAGEMENT LOCAL;

i get this error: 'cannot add file... - file already apart of database'. anyone know what is going on?

도움이 되었습니까?

해결책

My guess would be that the file is already part of the database, but part of a tablespace named something other than temp.

What do you get from the following query:

select tablespace_name from dba_data_files where file_name = 'C:/Oracle/oradata/orcl/temp.dbf'
union all
select tablespace_name from dba_temp_files where file_name = 'C:/Oracle/oradata/orcl/temp.dbf';
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top