Home » RDBMS Server » Server Administration » dblink creation problem
dblink creation problem [message #60729] Mon, 01 March 2004 08:49 Go to next message
reena
Messages: 29
Registered: November 2001
Junior Member
hi how to create on
database link to other database and what are the prerequisteis needed
whether i have to give full qualified name the global name in dblink
i tried to create a dblink like create dblinlk sales connect hrm identified by hrm using sales where hrm and hrm are usernames and password and sales is connect string i assume but the error is
not specified connect string how to rectify it
thanks in advance
reena
Re: dblink creation problem [message #60730 is a reply to message #60729] Mon, 01 March 2004 10:13 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Try:
create database link sales connect to hrm identified by hrm using 'sales';

You can also create it using this form (which allows you to create multiple DB links to the same database from that account, and helps to remind you where it points to.

create database link sales@hrm connect to hrm identified by hrm using 'sales';
create database link sales@scott connect to scott identified by tiger using 'sales';

'sales' must be defined in the server's tnsnames.ora file.
Re: dblink creation problem [message #60749 is a reply to message #60730] Tue, 02 March 2004 12:03 Go to previous messageGo to next message
reena
Messages: 29
Registered: November 2001
Junior Member
i created one database link to connect this sales database

1 CREATE DATABASE LINK Sales.KSDOMAIN.COM
2* CONNECT TO GLADMIN IDENTIFIED BY GLADMIN
SQL> /

Database link created.

SQL> SELECT * FROM TAB_ACCOUNT@Sales.KSDOMAIN.COM;
SELECT * FROM TTAB_ACCOUNT@Sales.KSDOMAIN.COM
*
ERROR at line 1:
ORA-02019: connection description for remote database not found

the i droped the dblink and tried to maodify it like below

SQL>CREATE DATABASE LINK Sales.KSDOMAIN.COM
2* CONNECT TO GLADMIN IDENTIFIED BY GLADMIN using sales
CREATE DATABASE LINK Sales.KSDOMAIN.COM
2* CONNECT TO GLADMIN IDENTIFIED BY GLADMIN using sales

*
ERROR at line 1:
ORA-02010: missing host connect string

here sales is connect string then i tried to create the db link i am able to ping this sid sales eg tnsping slaes
Re: dblink creation problem [message #60751 is a reply to message #60749] Tue, 02 March 2004 13:12 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
The host string is in single quotes:

create database link sales@scott connect to scott identified by tiger using 'sales';
Previous Topic: strange object no longer exists
Next Topic: Data getting duplicated
Goto Forum:
  


Current Time: Fri Sep 20 12:42:38 CDT 2024