Solved

dblink error ORA-00942 & ORA-02063

Posted on 2007-04-09
9
9,900 Views
Last Modified: 2013-12-18
oracle db 10g2:
I have 3 databases, I will call them: db1,db2,db3

o I created dblinks using the same ddl on db2 and db3 that allow me to access db1.
o On db2 and db3 I am using a user with the same name and same privileges and roles - I will call the user bdops
o On am trying to access a table (named delete_stuff) in db1 owned by the user bdopstage.
o From db2 user bdops; I am able to access the 'delete_stuff' table on db1 with no problem.
o From db3 user bdops; I am not able to access the 'delete_stuff' table on db1 with no problem.
I get the following errors:
ORA-00942: table or view does not exist
ORA-02063: preceding line from DB1.WORLD@BDOPSTAGE
:: I get this error when trying to access this new table created (delete_stuff). But I can access almost all of the other tables in the bdopstage schema using this dblink. It would seem as though it is a permission issue but I am having no problem accessing any tables using the dblink on db2.

What would differentiate the 2 db's, db2 and db3, to make one dblink work for all tables and the other dblink to not work with all tables?
0
Comment
Question by:thomgreen
  • 3
  • 3
9 Comments
 
LVL 16

Expert Comment

by:MohanKNair
ID: 18877873
Are there any synonyms for the table delete_stuff.

select * from all_synonyms where synonym_name='DELETE_STUFF';
0
 

Author Comment

by:thomgreen
ID: 18878050
yes. I created a public synonym.
0
 
LVL 16

Expert Comment

by:MohanKNair
ID: 18878266
Perhaps a public synonym by name delete_stuff is referring to a table in another schema that does not have select privilege.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:thomgreen
ID: 18878512
The synonym code is below:
CREATE PUBLIC SYNONYM delete_stuff
  FOR BDOPSTAGE.DELETE_STUFF

Check out my original posting real quick. I can select from dual and almost all other tables... i can't select on the 'delete_stuff' table (through the dblink) nor can I select from other new tables that I create directly on that db1.

I thought that it might be a permissions issue but I can access all tables through the dblink from db2. Is there any specifics about that particular table that would not allow me to select from db3?

I figured that maybe the roles where not usable through a dblink so I made sure that the 'BDOPSTAGE' user that I was linking to had all of the necessary privileges directly granted to itself.

I am truly confused by this.

0
 
LVL 16

Accepted Solution

by:
MohanKNair earned 500 total points
ID: 18878606
Create aprivate synonym instead of public synonym. Also specify the DB Link name wheb creating the synonym

CREATE SYNONYM delete_stuff FOR BDOPSTAGE.DELETE_STUFF@<db_link_name>
0
 

Author Comment

by:thomgreen
ID: 18878822
I fixed the problem... thank for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now