We are writing some interfacing routines in PL/SQL to transfer data between several oracle database by using another oracle database as host. (ie hr -> host -> finance)
the transfers are happening over db_links essentially
insert into schema.tablname@dblink1 select * from schema.tablename@dblink2;
(its more complicated then that with multiple tables and transformations etc.. but that's the general idea)
the discussion we have been having here is which of the following should do
- reference "
schema.tablename@dblink
" everywhere in out code create synonyms (public or private) "
create synonym tablename for schema.tablename@dblink
"create views on the object "
create view tablename as select * from schema.tablename@dblink
"
are there any other options? are any inherently better then the others?
NB:the dblink names are standardised throughout each level dev/test/prod so that dblink 'server1' goes to the dev server on the dev host and the test server on test host etc..
none of the table names should ever exist on multiple servers