×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Connecting to Tables on a different Database/Server

Connecting to Tables on a different Database/Server

Connecting to Tables on a different Database/Server

(OP)
If I have two Oracle Databases on two different Unix Servers,connected via a network, how can I look at the tables in the remote database from the local one. Both have the listener running.....

Thanks for any help

Dan Auber
DanAuber@aol.com
Dan Auber's Home Page

RE: Connecting to Tables on a different Database/Server

You will have to create a database link on the local database that connects to the remote db.  The easiest way to do this is in the Schema Manager component of Enterprise Manager.

Also there needs to be an entry for the remote db in the tnsnames.ora file on the local server.

RE: Connecting to Tables on a different Database/Server

(OP)
Karluk - thanks for your reply. Unfortunatley I have no idea what the Schema Manager component of Enterprise Manager is. Can I do it via commands in sqldba ??

Dan Auber
DanAuber@aol.com
Dan Auber's Home Page

RE: Connecting to Tables on a different Database/Server

Hi Dan,

Yes -- you can do this in sqldba or svrmgrl or sqlplus -- any environment that gives you an SQL prompt.

E.G.

CREATE PUBLIC DATABASE LINK OTHERDB_LNK
    CONNECT TO mike IDENTIFIED BY mrbigboy
    USING 'otherdb';

You can then issue sql commands like this:

Select Count(*) From ALL_TABLES@OTHERDB_LNK;

and sql will:

1) connect to otherdb using the user-name mike and the password mrbigboy
2) run the sql on that table in that database.

You can create private database links by omitting the keyword PRIVATE.

You can make remote tables look local by creating a synonym for the remote table.

Mike
michael.j.lacey@ntlworld.com
Cargill's Corporate Web Site

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close