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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:16:06+00:00 2026-05-29T11:16:06+00:00

I have two schemas. 1.Schema A 2.Schema B I need to do following. I

  • 0

I have two schemas.

1.Schema A

2.Schema B

I need to do following.

  1. I want create some tables in schema B (same as some tables in A)
  2. Then Move data from A to B.

Now I want to do ALL this from schema A. I have written a package which when executed in A will create all the tables in B and then create synonyms for them in A. And then will just select data from its own tables and insert into B’s tables.

VERY IMP : Now this entire thing has to happen in one go. Just an execution of one begin block should do the entire job.

Problem : But now the synonyms would not work because Schema A does not have any privs on the tables it created in B .

so is there a way to create tables (from A to B ) with all the privs given at the creation time ?
Or can the schemas be switched in PL-SQL while execution so that privs can be granted from B to A ? (I am sure this can not be done, but nothing is impossible they say ! :O 😛 so asking )

Please help me guys ! All suggestions are welcome !

The Main objective of this job is to do it in one go and from only one 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-29T11:16:07+00:00Added an answer on May 29, 2026 at 11:16 am

    You can define a procedure which will run under definer rights, instead of caller rights

    CREATE OR REPLACE PROCEDURE definer_test AUTHID DEFINER IS 
    BEGIN
        ...
    END definer_test;
    

    You would define such a procedure in schema B, which does the job and call it from schema A.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables (already created), say Person and Address with following schemas: create
I need a litte bit help. I have the following two URLS: WSDL: https://amsel.dpwn.net/abholportal/gw/lp/schema/1.0/var3ws.wsdl
I have a bunch of XSD's from https://github.com/XeroAPI/XeroAPI-Schemas/tree/master/v2.00 I need to do two things:
I have two tables, both named as say, Employee in two different schema HR
I have two tables with identical schema. Let's name them TestTable and TestTableTemp .
I have two tables in my database schema that represent an entity having a
I have two tables userdetails and blog question The schema is UserDetails: connection: doctrine
I have two tables names book_list and book_category . Schema is like below: book_list
Let's say I have two tables, users and notes. Let's say the schemas look
I have a table schema similar to the following (simplified): CREATE TABLE Transactions (

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.