Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 27th, 2004, 09:17 AM
alba5 alba5 is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 68 alba5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 35 m
Reputation Power: 7
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

Reply With Quote
  #2  
Old September 28th, 2004, 06:22 AM
santosh_pai santosh_pai is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 14 santosh_pai User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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'

Reply With Quote
  #3  
Old September 28th, 2004, 08:08 AM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 6
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > DBLink - How do I set up??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway