I need please if you can give me ideas on how to solve the following:
I have a database that I will call Principal
that is in SQL Server
, it imports information from other databases ( Oracle
and SQL Server
) to show it in a system that only manipulates and shows the information in different ways (reports, graphs, etc.).
The import of this data is done through a Job
that runs every 2 hours (this schedule is strictly necessary since the information changes constantly).
The Job
takes around 10 minutes to finish executing and import the new information, the problem is that in that period of time the users can not consult data because the Job I have it the following form ( example ):
TRUNCATE TABLE Principal
INSERT INTO Principal
SELECT * FROM TablaDeOtraBaseDatos
Also, if an error occurs with Job
I no longer have data.
Any ideas on how to solve this? Or if I'm doing badly the Job
?
Thank you.