11-5. Synchronizing Data with a Remote Data Source

Problem

Your database instance requires data that is readily available in another Oracle instance but cannot be synchronized with a materialized view, and you do not want to duplicate data entry.

Solution

Write a procedure that creates a connection to the remote HR database and performs the steps needed to synchronize the two databases. Then use the EXEC DBMS_SCHEDULER.CREATE_JOB procedure to run the procedure on a regular basis. Suppose, for example, that your Oracle Database instance requires data from the HR employee table, which is in another instance. In addition, your employee table contains tables with foreign key references on the employee_id that prevents you from using a materialized ...

Get Oracle and PL/SQL Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.