How to create staging Tables with synonyms
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!