Home » Developer & Programmer » Forms » What is dblink?
What is dblink? [message #83464] Sun, 12 October 2003 00:38 Go to next message
R Saravanan
Messages: 7
Registered: March 2002
Junior Member
What is dblink?
How do we bdlink?
Kindly provide with Example.
Re: What is dblink? [message #83468 is a reply to message #83464] Tue, 14 October 2003 05:17 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
In your tnsnames.ora, you have provided all the databases you want to connect to. It looks like this:
firstdb.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = TCP)
          (Host = some_host_or_IP_address)
          (Port = some_port_usually_1521)
        )
    )
    (CONNECT_DATA = (SID = FIRSTDB)
    )
  )
anotherdb.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (PROTOCOL = TCP)
          (Host = some_host_or_IP_address)
          (Port = some_port_usually_1521)
        )
    )
    (CONNECT_DATA = (SID = ANOTHERDB)
    )
  )
With a database link (dblink) you can, as the phrase says, link a database to another. You can, from one database, access objects of another database.

There are three types of database links: PRIVATE and PUBLIC. The private are created for one user only, the public, well...eur..are publicly known in the database, so any user in the local database can use them. The third is the GLOBAL database link, but that's only applicable if you're using Oracle Names.

Assume you want to access database ANOTHERDB from database FIRSTDB. In order to do so, create a database link from FIRSTDB to ANOTHER DB:
SQL> CREATE DATABASE LINK Somelink CONNECT TO remote_user IDENTIFIED BY his_password USING 'ANOTHERDB';
Now you can access objects of remote_user like this:
Select some_column
  From his_table@somelink
 Where ....

Here's a link for more info.

Search the oracle manuals: http://tahiti.oracle.com, that's where all the links come from. It requires a (spam-)free subscription.

MHE
Previous Topic: installation error
Next Topic: Help for Change V2-Style to PLSQL Trigger after upgrade the SQLForms Version 2.0.21 to Form 4.5.7.1.
Goto Forum:
  


Current Time: Thu Apr 25 03:01:24 CDT 2024