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 6357217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:07:21+00:00 2026-05-24T23:07:21+00:00

I know this can be done, because I’ve seen it at my last workplace,

  • 0

I know this can be done, because I’ve seen it at my last workplace, but I don’t know how to replicate!

Basically, there is a MASTER user who has write privileges for all our tables. In our application’s DB adapter connection settings, we use DEFAULT_SCHEMA: MASTER

I have created a new test user for myself (on the same database as the master user, not using a database link) so that I can freely create test data without messing with real data. Then copied a table for my test user so that I can freely manipulate data: create table SIMMBOT.real_data_table as select * from MASTER.real_data_table

The problem is that I don’t know how to set up the connection so that Oracle knows to override MASTER.real_data_table with my own SIMMBOT.real_data_table. I have a hunch that you can’t actually do that in the connection settings… so starting from square one, what would I have to do to set up test tables like this? Something like a shared schema?

  • 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-05-24T23:07:22+00:00Added an answer on May 24, 2026 at 11:07 pm

    If your code is using fully qualified table names (i.e. MASTER.real_data_table or SIMMBOT.real_data_table) then there is no way from a configuration standpoint to change what object is being referred to.

    Assuming, however, that your code is not using a fully qualified table name– if it is just selecting from real_data_table, then Oracle will first look for an object in the current schema with that name then look for a public synonym with that name.

    If you connect as MASTER, you can change the current schema

    ALTER SESSION SET current_schema = SIMMBOT
    

    Once you’ve done that, all unqualified references to a table name will resolve to tables in the SIMMBOT schema. Note that the MASTER user would need to be granted appropriate access on the objects in the SIMMBOT schema separately– setting the current schema only affects name resolution, not privileges. The SIMMBOT schema would also need to have every table that the code wants to reference– there is no way to specify a hierarchy for resolving unqualified names. You can’t tell Oracle to first resolve unqualified names in the SIMMBOT schema and then the MASTER schema.

    An alternative would be to create synonyms for each table and manipulate the synonyms to reference your table for some or all users. If your application logged in as a third user that did not own any objects– APP_USER for example– you could create either private synonyms in the APP_USER schema that pointed to different objects in different schemas–

    CREATE SYNONYM app_user.real_data_table FOR simmbot.real_data_table;
    CREATE SYNONYM app_user.some_other_table FOR master.some_other_table;
    

    or you could create public synonyms that would apply to all users (other than those that owned the objects)

    CREATE PUBLIC SYNONYM real_data_table FOR simmbot.real_data_table;
    CREATE PUBLIC SYNONYM some_other_table FOR master.some_other_table;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know you can do this, because I've seen it done once before, but
i don't know if this can be done using php but it would be
This is something I know can be done somehow , because I've done it
I know this can be done and i have seen it done using some
I know I've done this before years ago, but I can't remember the syntax,
I know that this can be easily done by using if(i%5 == 0 OR
I know this is an easy question but I can't figure it out or
I know this isn't so complicated but I can't remember how to do. I
i know this is kinda retarded but I just can't figure it out. I'm
I know this is probably on the Internet somewhere but I can't find the

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.