前几天整理电脑,在某个根目录下发现一个光秃秃的SDE.DBF,我以为没用,就删掉了。今天上班突然要使用数据库,我想删掉这个表空间,怎么删都删不掉。老是报一下错误。
ORA-00604: 递归 SQL 级别 1 出现错误
ORA-04045: 在重新编译/重新验证 SDE.DB_EV_DROP_ST_METADATA 时出错
ORA-04098: 触发器 'SDE.DB_EV_ALTER_ST_METADATA' 无效且未通过重新验证
后来我想想可能和删除那个dbf有关系,哪位高手遇到过类似情况,不吝赐教!谢谢!

解决方案 »

  1.   


    SQL> conn / as sysdba
    已连接到空闲例程。
    SQL> startup
    ORACLE 例程已经启动。Total System Global Area  192937984 bytes
    Fixed Size                  1248044 bytes
    Variable Size             138413268 bytes
    Database Buffers           50331648 bytes
    Redo Buffers                2945024 bytes
    数据库装载完毕。
    数据库已经打开。
    SQL> create tablespace test datafile 'D:\kk.dbf' size 10M;表空间已创建。SQL> drop tablespace  test including contents and datafiles;表空间已删除。SQL>
      

  2.   

    或者是先把表空间offlineSQL> alter tablespace test offline;表空间已更改。SQL> drop tablespace  test including contents and datafiles;表空间已删除。SQL>
      

  3.   

    我在执行 alter tablespace test offline;时,报文件7已脱机-无法进行正常脱机
    ora01110:数据文件7 ‘D:\sde.dbf’
      

  4.   

     drop tablespace  test including contents and datafiles;
    那你就直接执行这个语句啊
      

  5.   

    ORA-04098: trigger "string.string" is invalid and failed re-validation
    Cause: A trigger was attempted to be retrieved for execution and was found to be invalid. This also means that compilation/authorization failed for the trigger.
    Action: Options are to resolve the compilation/authorization errors, disable the trigger, or drop the trigger.SDE.DB_EV_ALTER_ST_METADATA把这个触发器先删除掉,然后再执行呢。
      

  6.   

    @Oraclefans: 按照你的建议,的确删掉了!谢谢大家!