Home » RDBMS Server » Server Administration » how can i link two databases
how can i link two databases [message #196938] Mon, 09 October 2006 04:52 Go to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Hello Everyone,

I am having two databases running on a single machine[Accounts & sales], How can i access the Accounts DB from Sales DB ...how can i link two databases

win 2000 server
Oracle 9.2


Thanks in Advance
Re: how can i link two databases [message #196939 is a reply to message #196938] Mon, 09 October 2006 05:04 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Use a database link.
Re: how can i link two databases [message #196957 is a reply to message #196938] Mon, 09 October 2006 06:08 Go to previous messageGo to next message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
I have gone thru the documentation. My question is
suppose I have one DB as Accounts n Another as Sales.
in Sales, i have a schema Accountant
& in Accountant schema i have a table acct_2006.

Now?

from the sales DB how can i access the acct_2006 table
what will be the link for that?

if i will create a link as

CREATE PUBLIC DATABASE LINK remote
USING 'Accounts';

how can i be able to access acct_2006

Appreciating your response
Re: how can i link two databases [message #196968 is a reply to message #196957] Mon, 09 October 2006 06:48 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Sorry, kinda confused as to your requirements. You mention the ACCT_2006 table is in the SALES database, but then mention "how do i access the ACCT_2006 table from the sales database"??

I'll assume you want to access ACCT_2006 that is in the ACCOUNTS database from the SALES database. You'd create a database link in the SALES datbase as:

create database link remote
connect to accountant identified by password
using 'account_tns';

where account_tns is the actual tns alias you use to connect to the ACCOUNTS database from the SALES database.

Re: how can i link two databases [message #196974 is a reply to message #196938] Mon, 09 October 2006 07:30 Go to previous message
it_me24
Messages: 167
Registered: March 2006
Location: delhi
Senior Member
Thankyou very much Laughing
Previous Topic: Implementing a version control mechanism
Next Topic: database clonnig (urgent)
Goto Forum:
  


Current Time: Sat Dec 10 20:28:40 CST 2016

Total time taken to generate the page: 0.07807 seconds