我有一个Oracle视图,当尝试查看、替换甚至删除视图时,它会显示以下错误:
DROP X.z force
*
ERROR at line 1:
ORA-06553: PLS-707: unsupported construct or internal error [2604], [403]
ORA-06553: PLS-103: Encountered the symbol "Vendor " when expecting one of
the following:
<an identifier> <a double-quoted delimited-identifier>
ORA-06553: PLS-112: end-of-line in quoted identifier提到的列错误地有一个分隔线(它是:"Vendor Name")。我不能替换,重命名,甚至删除来解决这个问题。有没有什么办法可以强制删除或重新创建?!
发布于 2018-08-16 01:24:33
根据My Oracle Support Doc ID 2254717.1中描述的内容,您应该能够执行以下操作:
column object_id new_value bad_object_id;
select object_name, object_type, owner, status, object_id
from all_objects
where object_type='VIEW' and owner='X' and object_name = 'Z';
OBJECT_NAME OBJECT_TYPE OWNER STATUS OBJECT_ID
------------------------------ ------------------- ------------------------------ ------- ----------
Z VIEW X VALID 445264
exec dbms_utility.invalidate(&bad_object_id);
PL/SQL procedure successfully completed.
select object_name, object_type, owner, status, object_id
from all_objects
where object_type='VIEW' and owner='X' and object_name = 'Z';
OBJECT_NAME OBJECT_TYPE OWNER STATUS OBJECT_ID
------------------------------ ------------------- ------------------------------ ------- ----------
Z VIEW X INVALID 445264
drop view X.z;
View X.Z dropped.我已经使用了替代变量,当然,您也可以手动输入对象ID。
我还没有弄清楚如何重现这个问题- MoS文档似乎也不知道它是如何发生的,尽管在这种情况下是从11g升级到12c,并且只能模糊地推测损坏。我尝试使用相同的版本导出和导入视图,但仍然没有任何问题。因此,我还不能验证这是否真的会像广告中所说的那样工作,但看起来它应该会……
https://stackoverflow.com/questions/51860156
复制相似问题