|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hi Guys...
I am relatively new at Oracle and have been trying to find a way of accomplishing this for a bit... I'm hoping someone can point me in the right direction... I have 2 databases set up... DB1 Employee_Id - from E0001 to E0099 DB2 Employee_Id - from E0100 to E1000. When I issue an SQL statement - Select Employee_Id where Employee_Id is > E0100, it goes out and searches both databases (accross the network) obviously not returning any values from DB1, only the ones from DB2 that fit the criteria. How would I prevent this? Is there a way to specify to only go to the one database since I know the Emp_Id ranges on both? Any help/tip/link would be appreciated! AngieB ![]() |
|
#2
|
|||
|
|||
|
dblink
Hi,
you can define a dblink in db1 connecting to the emp table in db2: create database link db2 connect to user identified by password using 'db2'; after that you can: select * from emp@db2; you have to define the connect string in the tnsnames under the db1 machine. good luck. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Optimizing searches on 2 databases |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|