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.
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.