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