• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to connect the synonym table in Stored procedure?

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, everyone! Happy new year!
I am writing a SP in oracle using TOAD, I am able to access the table which is synonym in SQL editor, but have problem to access it in stored procedure, the system told me "the table/view is not existed", how can I fix it?
Thanks
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it a public synonym. If it is then there are also grants which need to be created for the non-owner user to use this table. Even though the table is public the non-owner user needs to have select grants to it to read it.
Hope that helps.
Mark
 
Raymond Ou
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark, thanks!
Actually I have solved the problem to create another synonym specific for that non-owner user and grant the select right to the same user. The previous synonym maybe a public one as you say, but I have no idea why I can select the same table in SQL editor of TOAD with and unable to access it in SP.
Raymond
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic