首页 > 其他 > 详细

ORA-00980:synonym translation is no longer valid

时间:2014-05-17 00:23:23      阅读:613      评论:0      收藏:0      [点我收藏+]

今天要把测试环境DB的数据更新成最新Production环境的数据,期间发生了一些问题:

1.首先从正式环境exp出想要用户的dmp档

2.drop掉测试环境底下相应用户

3.create测试环境底下相应用户

4.imp 正式环境导出的dmp档

5.在测试环境底下explain plan sql时报:ORA-00980: synonym translation is no longer valid

 

用以下语句查下失效的synonym

select ‘drop ‘        || decode (s.owner,                   ‘PUBLIC‘, ‘public synonym ‘,                   ‘synonym ‘ || s.owner || ‘.‘)        || s.synonym_name        || ‘;‘ as "Dropping invalid synonyms:"   from dba_synonyms s  where table_owner not in (‘SYSTEM‘, ‘SYS‘) and db_link is null    and not exists           (select null              from dba_objects o             where s.table_owner = o.owner               and s.table_name = o.object_name)

 

发现有个TOAD_PLAN_TABLE的synonym失效,应该是我在砍User的时候,没有把这个同义词相应的砍掉

 

解决:drop public synonym TOAD_PLAN_TABLE;

ORA-00980:synonym translation is no longer valid,布布扣,bubuko.com

ORA-00980:synonym translation is no longer valid

原文:http://www.cnblogs.com/zwl715/p/3724981.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!