[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Database



Jimmy Liao wrote
>Does anyone know whether if it is possible for the SQR program to be
>located in one
>database and yet retrieve data from another database within the same
>server?  If so,
>how can it be accomplished?
Snip--->

Actually, SQR programs are not located IN a database.
In the Oracle world sometimes PeopleSoft refers to multiple
schemas in tha same database instance as multiple databases.
If this is what you are talking about then you can simply prefix the
table names with the proper schema as below:

Where sysadm is the owner of one schema and sysadm2 owns the other.

select xxxx,yyyyy
from sysdadm.ps_job a, sysadm2.ps_job
where some condition etc;

If you are actually talking about selecting data from two distinct
instances
then you will need to do have your dba create a database link.
Then your query would look something like:

Where the two instances are HDMO and HRTEST.

select xxxx,yyyyy
from sysadm.ps_job@HDMO a, sysadm.ps_job@HRTEST b
where some condition...etc;

Hope this helps.  Of course there are some gotchas left.

Jim Anderson
Oracle/PeopleSoft DBA