|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
DBLink - How do I set up??
Hi,
I want to set up a Database Link so I can refer to tables on another database in my query. How do I set this up? is there a view so that I can see what links are set up? We used to have a link setup on our server, but it has since had a hard-reset and now the SQL using the link doesnt work. Thanks Al |
|
#2
|
|||
|
|||
|
Query to see the database links already set up
select * from user_objects where object_type ='DATABASE LINK' To Create a Database link create database link TEST connect to DATABASE_USER identified by DATABASE_PASSWORD using 'CONNECT_STRING' |
|
#3
|
|||
|
|||
|
To use this database link into your query, an example is given below:
SELECT e.empno, e.ename,d.deptno FROM emp e, dept@test.dblink d WHERE e.edeptno = d.deptno / In above example test.dblink is the database link name and it is connected to the table by using @ sign. emp table is present in your current schema but dept table is present into other schema of another database. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > DBLink - How do I set up?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|