码迷,mamicode.com
首页 > 其他好文 > 详细

ORA-00980:synonym translation is no longer valid

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

标签:code   c   a   数据   cti   name   

今天要把测试环境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

标签:code   c   a   数据   cti   name   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!