Oracle之处理synonym同义词无效对象

本文探讨了在Oracle数据库中遇到synonym同义词引用无效对象的问题,包括如何排查和解决这类问题。
摘要由CSDN通过智能技术生成
Oracle之处理synonym同义词无效对象


ORA-00980: synonym translation is no longer valid

1. 举例,在sys用户下建一个t表
[oracle@testdb1 ~]:testdb1> sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Nov 14 09:33:29 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create table t (x number);

Table created.

SQL> insert into t values (1);

1 row created.

SQL> commit;

Commit complete.



2. 再建立一个sec用户

SQL> create user sec identified by sec;

User created.


3. 使用sec用户,建立同名表syn_t
SQL> conn sec/sec
ERROR:
ORA-01045: user SEC lacks CREATE SESSION privilege; logon denied
Warning: You are no longer connected to ORACLE.
SQL> grant dba to sec;
SP2-0640: Not connected
SQL> conn /as sysdba;
Connected.
SQL> grant dba to sec;
Grant succeeded.

SQL> conn sec/sec
Connected.
SQL> create synonym syn_t for sys.t;     
Synonym created.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值