Search code examples
databaseoracledatabase-connectionreplication

Expose ready-only data from Oracle DB to another Oracle DB


We have the following scenario:

We have an Oracle database in a secure zone (called inner). We want to expose a subset of its data (which is represented by a view) to another Oracle database in another (unsecure) zone (called outter).

We considered to do that with a database link from outter to inner. However, we have a very odd restriction:

It's not allowed to make requests from outter to inner. We are only allowed to push data from inner to outter.

A database link would violate this constraint as it would allow outter to make "requests" (SQL queries) to inner. So we need another solution.

We already thought of a regularly triggered export from inner which gets imported in outter. That would be OK, but we would prefer a solution which always provides up-to-date date in outter.

Any ideas?


Solution

  • Define on both database extra users with minimum required privileges.

    Define the DB Link from INNER to OUTTER.

    Publish the data with this query connected on INNER, pushing the data to OUTTER via DB link

     INSERT into outter_table@outter_db
     SELECT * from inner_view