Results 1 to 6 of 6

Thread: Database Links

  1. #1
    Join Date
    Feb 2003
    Location
    In your thoughts
    Posts
    195

    Unanswered: Database Links

    Is it possible to have a database link between two tables in two different databases with different table structures? What I'd like to do is tie the IM table in DB1 to the IM table in DB2. These tables are exactly the same except the table in DB1 has one column that the table in DB2 doesn't have and the table in DB2 has an additional 3 columns that the table in DB1 doesn't have. Thanks, Jeremy
    Nothing better than a good ride.

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    you link different instances of oracle databases together and then you can retrieve each others tables vice versa ...

    from db2

    Create database link db1
    connect to your_login identified by
    your_password using 'connectString'

  3. #3
    Join Date
    Sep 2002
    Location
    Ohio
    Posts
    204

    Re: Database Links

    Originally posted by JCScoobyRS
    Is it possible to have a database link between two tables in two different databases with different table structures? What I'd like to do is tie the IM table in DB1 to the IM table in DB2. These tables are exactly the same except the table in DB1 has one column that the table in DB2 doesn't have and the table in DB2 has an additional 3 columns that the table in DB1 doesn't have. Thanks, Jeremy
    I don't understand what you mean by "tie" the tables together. A database link itself is not dependent on any table in either database. A database link is basically a pre-defined connection from one database to another. The objects that are visible at the 'linked to' database is dependent on the privileges of the user in the 'connect to' clause of the link definition.

    Please explain what you mean by "tie" the table together and we'll see if we can help you.

    Patrick

  4. #4
    Join Date
    Feb 2003
    Location
    In your thoughts
    Posts
    195
    Bad wording...sorry. What I need to do is make it where I have a link between a database. From there, I was told that I could make it where when I make changes to a table in DB1, the changes would also reflect in DB2. Does this make better sense? I need to have a table in two different databases basically that are the same at all times. Thanks, Jeremy
    Nothing better than a good ride.

  5. #5
    Join Date
    Oct 2002
    Location
    greenwich.ct.us
    Posts
    279
    You're looking for some sort of replication. If you only will be making changes on one database and copying the values to the other on a periodic basis, you can use simple or snapshot replication. If you want to make changes to more than one table, you want multi-master replication. Either way, a complete guide to replication is out of the scope of this forum. Check http://download-west.oracle.com/docs...ntro.htm#43109 for details.

  6. #6
    Join Date
    Feb 2003
    Posts
    45
    You change the IM table in DB1 and it is reflected in DB2.

    If you only want the IM table in DB1 to be updatable then try using a View for the IM table in DB2, it won't be updateable from DB2, but you'll get less hassle configuring this than replication and all its setup requirements.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •