Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Retreive data between schemas
This is a perfect case where synonyms can help.
Create a synonym for the object. The synonym can refer to a remote object using a database link. If the object moves, just drop and re-create the synonym.
The programs are coded to refer to the synonym. If the object moves, the programs require no change!
suisum@freenet.edmonton.ab.ca wrote:
Hi Jeroen:Received on Sat Sep 12 1998 - 14:17:53 CDTThank you very much for your reply.
Yes, I forgot to mention that the project I am working on is still under
development. All the table anme, table columns, and database instance name
have not been finialized yet. But I need to do the coding. That's why I
want NOT to hard-code teh database link in my program, just in case of
changes.The data I need to access are in different schema and in different
database.Best regards,
Jeroen van Sluisdam (Jeroen.van.Sluisdam@vrijuit.nl) wrote:
: Hi: - if those schemas are in the same database just use schemaname.tablename
: Condition is that you have
: select rights for those tables
: - if it has to run regularly use a database link, create the thing outside
: you're program and use
: linkname.table_name
: - if it has to run once use exp, imp table to a certain user or not: Jeroen
: suisum@freenet.edmonton.ab.ca wrote:
: > From suisum@freenet.edmonton.ab.ca Sat Sep 12 05:38:45 1998
: > Date: Wed, 9 Sep 1998 22:30:10 -0600 (MDT)
: > From: Still Water <suisum@freenet.edmonton.ab.ca>
: > To: Oracle dba <oracledba@MailingList.net>
: > Subject: Retreive data between schemas
: >
: > Hi:
: >
: > If I need to retrieve data from serveral schemas, what will be the best
: > way to do it?
: >
: > . to use database link.
: > But I don't know how to do that in a stored procedure.
: > I don't know how to avoid hard-code the database link in the program.
: >
: > . to create temporary tables and use SQLLDR.
: >
: > . to do export and import.
: >
: > --
: > Best regards,--
Best regards,