Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to create staging Tables with synonyms

CrackerJackJun 25 2008 — edited Jun 25 2008
Hi All,

I have a package which runs and updates a table weekly.

My question is,the web service is hitting on this table(TABLE CC) all the time.When my script runs it will be at least 20 minutes.Hence there would be a gap and the web service is unable to hit anything on the table as the previous data will be deleted and loaded with new data.

I have heard of staging tables and synonyms but I hope someone could share how do I start about it.


1)Rename CCto CC_1;


2)Create synonym CC for CC_1;


3)Run the scripts to load the data into a new table called CC_2;


4)Drop the synonym CC


5)Create synonym CC for CC_2;

6)check in select * from all_synonyms to see whether the synonyms are pointing to which table.


What about my scripts that would update the table CC.Do I need to change it to CC1 or CC2 all the time??Or can it be done dynamically.Stuck and don't knwo where to start.

Tha!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2008
Added on Jun 25 2008
3 comments
549 views