如何解决ORA-04063:view" SYS.ALL_QUEUE_TABLES"有错误?

时间:2015-09-21 10:17:48

标签: oracle oracle10g oracle-adf jdeveloper

Jdev版本11.1.1.7.1

我正在使用Oracle数据库10g XE&我能够连接到数据库并检索HR模式中的所有表。但是,当我试图从Table"创建"业务组件时我收到了上面提到的错误。我已卸载Jdeveloper并再次重新安装它。我仍然得到同样的错误。

以下是错误说明: -

The following SQL statement failed :

SELECT /*OracleDictionaryQueries.ALL_ORACLE_OBJECT_QUERY(3)*/
   O.OBJECT_NAME, O.OBJECT_TYPE, O.OBJECT_ID
FROM   ALL_OBJECTS O
WHERE  O.OWNER = ?
AND    O.OBJECT_NAME LIKE ?
AND    O.OBJECT_TYPE IN (?, ?, ?)
AND    O.SUBOBJECT_NAME IS NULL
AND    O.SECONDARY = 'N'
AND    ( O.OBJECT_TYPE <> 'INDEX' OR
     (
      EXISTS (SELECT 1
              FROM   ALL_INDEXES I
              WHERE  I.OWNER = O.OWNER
              AND    I.INDEX_NAME = O.OBJECT_NAME
         AND    I.DROPPED = 'NO'
             )
     )
   )
AND    ( O.OBJECT_TYPE <> 'TRIGGER' OR
     (
      EXISTS (SELECT 1
              FROM   ALL_TRIGGERS TR
              WHERE  TR.OWNER = O.OWNER
              AND    TR.TRIGGER_NAME = O.OBJECT_NAME
              AND   (   TR.BASE_OBJECT_TYPE <> 'TABLE'
                     OR EXISTS ( SELECT 1 FROM ALL_TABLES T2
                                 WHERE  T2.OWNER = TR.TABLE_OWNER
                                 AND    T2.TABLE_NAME = TR.TABLE_NAME
                            AND    T2.DROPPED = 'NO'
                                )
                    )
             )
     )
   )
AND    ( O.OBJECT_TYPE <> 'TYPE' OR
     EXISTS (SELECT 1
              FROM   ALL_TYPES T
              WHERE  T.OWNER = O.OWNER
              AND    T.TYPE_NAME = O.OBJECT_NAME)
   )
AND    ( O.OBJECT_NAME NOT LIKE 'AQ$%' OR
     NOT EXISTS
     ( SELECT 1
       FROM   ALL_QUEUE_TABLES QT
       WHERE  O.OWNER = QT.OWNER
       AND    (   O.OBJECT_NAME = 'AQ$'||QT.queue_table
               OR O.OBJECT_NAME like 'AQ$'||QT.queue_table||'^_%' escape '^'
               OR O.OBJECT_NAME like 'AQ$^_'||QT.queue_table||'^_%' escape      '^')
      )
   )
UNION ALL
SELECT /*OracleDictionaryQueries.ALL_TABLE_ORACLE_QUERY*/
   X.TABLE_NAME
,     'TABLE' OBJECT_TYPE
,     (SELECT O.OBJECT_ID
   FROM   ALL_OBJECTS O
   WHERE  O.OWNER = X.OWNER
   AND O.OBJECT_TYPE = 'TABLE'
   AND O.OBJECT_NAME = X.TABLE_NAME) OBJECT_ID
FROM (
SELECT T.TABLE_NAME, T.OWNER
FROM   ALL_TABLES T
WHERE  T.OWNER = ?
AND    T.NESTED = 'NO'
AND    T.TABLE_NAME LIKE ?
AND    T.IOT_NAME IS NULL
AND    T.SECONDARY = 'N'
AND    T.DROPPED = 'NO'
MINUS
SELECT QT.QUEUE_TABLE, QT.OWNER
FROM   ALL_QUEUE_TABLES QT
WHERE  QT.OWNER = ?
AND    QT.QUEUE_TABLE LIKE ?
MINUS
SELECT MV.MVIEW_NAME, MV.OWNER
FROM   ALL_MVIEWS MV
WHERE  MV.OWNER = ?
AND    MV.MVIEW_NAME LIKE ?
MINUS
SELECT MVL.LOG_TABLE, MVL.LOG_OWNER
FROM   ALL_SNAPSHOT_LOGS MVL
WHERE  MVL.LOG_OWNER = ?
AND    MVL.LOG_TABLE LIKE ?
MINUS
SELECT RU.TABLE_NAME, RU.OWNER
FROM   ALL_TABLES RU
WHERE  RU.TABLE_NAME LIKE 'RUPD%'
AND    RU.TEMPORARY = 'Y'
AND    RU.OWNER = ?
AND    EXISTS (SELECT 1
           FROM   ALL_TAB_COLUMNS ATC
           WHERE  ATC.OWNER = RU.OWNER
           AND    ATC.TABLE_NAME = RU.TABLE_NAME
           AND    ATC.COLUMN_NAME = 'CHANGE_VECTOR$$')
) X
UNION ALL
SELECT T.TABLE_NAME
,     'TABLE' OBJECT_TYPE
,     (SELECT O.OBJECT_ID
   FROM   ALL_OBJECTS O
   WHERE  O.OWNER = T.OWNER
   AND O.OBJECT_TYPE = 'TABLE'
   AND O.OBJECT_NAME = T.TABLE_NAME) OBJECT_ID
FROM   ALL_OBJECT_TABLES T
WHERE  T.OWNER = ?
AND    T.TABLE_NAME LIKE ?
AND    T.IOT_NAME IS NULL
AND    T.NESTED = 'NO'
AND    T.SECONDARY = 'N'
AND    T.DROPPED = 'NO'

有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:1)

假设您的数据库没有损坏,可能的原因是您登录到数据库的用户没有访问SYS.ALL_QUEUE_TABLES视图的权限。要快速测试,您可以执行SELECT。如果您无法从ALL_QUEUE_TABLES中选择数据,请让您的DBA授予您适当的访问权限(您可能只需要GRANT SELECT ON SYS.ALL_QUEUE_TABLES TO whatever_user_needs_access),或者,如果这是您可以访问适当特权帐户的系统,请记录作为特权用户并执行whatever_user_needs_access,将manifest.plist替换为您需要提供访问权限的用户名。祝你好运。