2017. 5. 24. 15:55 오라클
공백으로 ORA-959 에러 tablespace drop 안될때
Tablespace name에 공백이 들어갔는지 확인하는 방법
SQL> select '"'||name||'"' from sys.ts$;
만약 공백이 들어있다면 ORA-959 에러후 drop 되지 않는다.
SQL> drop tablespace 'TBS_TRC ' including contents and datafiles;
drop tablespace 'TBS_TRC ' including contents and datafiles
*
ERROR at line 1:
ORA-02216: tablespace name expected
SQL> drop tablespace "TBS_TRC " including contents and datafiles;
drop tablespace "TBS_TRC " including contents and datafiles
*
ERROR at line 1:
ORA-00959: tablespace 'TBS_TRC ' does not exist
=========================================================
해결책
-> rename 후 drop 해 볼것.
SQL> ALTER TABLESPACE "TBS_TRC " RENAME TO "TESTDROP";
SQL> drop tablespace testdrop including contents and datafiles;