ORA-04063:视图“SYS.ALL_QUEUE_TABLES”有错误

时间:2016-06-13 22:11:00

标签: sql oracle oracle-sqldeveloper

在我运行此代码之前,我尝试查看Oracle SQL Developer中实现了哪些表在左侧单击“+”时显示了此错误的窗口:

BEGIN
   FOR cur_rec IN (SELECT object_name, object_type
                 FROM user_objects
                WHERE object_type IN
                         ('TABLE',
                          'VIEW',
                          'PACKAGE',
                          'PROCEDURE',
                          'FUNCTION',
                          'SEQUENCE'
                         ))
 LOOP
  BEGIN
     IF cur_rec.object_type = 'TABLE'
     THEN
        EXECUTE IMMEDIATE    'DROP '
                          || cur_rec.object_type
                          || ' "'
                          || cur_rec.object_name
                          || '" CASCADE CONSTRAINTS';
     ELSE
        EXECUTE IMMEDIATE    'DROP '
                          || cur_rec.object_type
                          || ' "'
                          || cur_rec.object_name
                          || '"';
     END IF;
  EXCEPTION
     WHEN OTHERS
     THEN
        DBMS_OUTPUT.put_line (   'FAILED: DROP '
                              || cur_rec.object_type
                              || ' "'
                              || cur_rec.object_name
                              || '"'
                             );
     END;
  END LOOP;
END;

SQL Developer停止工作,我关闭了它,当我再次运行它时,显示了这个错误。

感谢任何解决方案。

0 个答案:

没有答案