Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8909809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:31:41+00:00 2026-06-15T03:31:41+00:00

here’s a tricky case on which 5 peoples including a DBA have been struggling

  • 0

here’s a tricky case on which 5 peoples including a DBA have been struggling on for days… I offer lifetime consideration to the one which will identify the root cause of the issue.

here it is:

Oracle Client: 10g
Oracle Server: 11g

We have 2 schemas and 1 user:

SCHEMA1

SCHEMA2

USER

We have 1 table 'TOTO' which is defined in SCHEMA1 (SCHEMA1.TOTO)
We have a private synonym of table 'TOTO', called 'TOTO' defined in SCHEMA2, created like this:

CREATE SYNONYM SCHEMA2.TOTO FOR SCHEMA1.TABLE1;

We have granted SELECT,UPDATE,DELETE,INSERT priviledges on “SCHEMA2.TOTO ” (so on the synonym) to SCHEMA2 (so that any session ran from SCHEMA2 has access to the synonym table)

GRANT SELECT, UPDATE, DELETE, INSERT ON SCHEMA2.TOTO TO SCHEMA2;

Our application connects to the DB with USER, then directly switches to SCHEMA2:

ALTER SESSION SET CURRENT_SCHEMA=SCHEMA2;

Then after that, it tries to perform a select query on the synonym table WITHOUT prefixing the synonym name by SCHEMA1 (this is a constrain of the framework we use):

SELECT COL FROM TOTO;

Most of the times this query works successfully, which is what we expect since we have altered our session to SCHEMA2, by default that where the objects are looked.

But sometimes it fails, with an ORA-00942: table or view does not exist error.

I insist on the fact that between the time when it works and when it fails, nothing has changed, we’ve just restarted the application (which is of course re-connecting to the DB the same way at each startup).
We’ve been investigated with a DBA monitoring all the events on USER,SCHEMA1,SCHEMA2 hoping to find an external process modifying the GRANTS on one of thoses, between a success and a failure, but nothing changes. Yet, at some point, randomnly we get the ORA-00942 error, then we restart the application several times and it’s back again…

Would someone have an idea or any suggestion/hint that could lead us to identify what we’re missing here?

Many thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:31:42+00:00Added an answer on June 15, 2026 at 3:31 am

    The grant should go to USER, not to SCHEMA2:

    GRANT SELECT, UPDATE, DELETE, INSERT ON schema1.toto TO userxy;
    

    This should solve the problem. If it doesn’t, can you please post the result of

    SELECT * FROM all_objects WHERE object_name='TOTO';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here are the tables I have: Table A which has entries with item and
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
I have a jquery bug and I've been looking for hours now, I can't
Here's a problem I ran into recently. I have attributes strings of the form
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is my code, which takes two version identifiers in the form 1, 5,
Here we go again, the old argument still arises... Would we better have a
Here is the problem that I am trying to solve. I have two folders
Here's the basic setup: I have a thin bar at the top of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.