Home » RDBMS Server » Server Administration » syntax of dblink
syntax of dblink [message #52777] Tue, 13 August 2002 03:36 Go to next message
Nishant
Messages: 20
Registered: August 2001
Junior Member
Hi,

Please tell me the syntax to create a dblink?
how shall i use that dblink to fetch or connect to that remote database?

thanks
Nishant
Re: syntax of dblink [message #52781 is a reply to message #52777] Tue, 13 August 2002 05:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
from the docs
CREATE DATABASE LINK sales.hq.acme.com 
   CONNECT TO scott IDENTIFIED BY tiger 
   USING 'sales';

Once this database link is created, you can query tables in the schema scott on the remote database in this manner: 

SELECT *
   FROM emp@sales.hq.acme.com;

Re: syntax of dblink [message #52783 is a reply to message #52777] Tue, 13 August 2002 08:04 Go to previous message
Vincent KOUAKOU
Messages: 5
Registered: July 2002
Junior Member
CREATE shared/public DATABASE LINK dblink_name CONNECT TO current_user/user_name IDENTIFIED BY user_password USING 'connect_string';

you can use PUBLIC or SHARED, CURRENT_USER or specify on user. If you do not specify PUBLIC or SHARED, as default it is PUBLIC.
Previous Topic: connection problem on client side
Next Topic: An error while installing Oracle.
Goto Forum:
  


Current Time: Thu Sep 19 13:53:36 CDT 2024