Hi all!

I am having a problem setting up/configuring database link from PGVL DB to remote DB ITMIT as I have never before set up Db Link.

On PGVL DB(source),I have issued the following command from system
user:

Grant CREATE PUBLIC DATABASE LINK TO PVL;

Next,from PVL schema:

create public database link pgvl.orcl connect to pvl identified by pvl using 'remotesite';

Next,in tnsnames.ora file on PGVL DB,I have setup the following:

orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = integrator-15)
(Port = 1521)
)
)
(CONNECT_DATA = (SERVICE_NAME= orcl)(SRVR=DEDICATED))
)


remotesite=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = integrator-15)
(Port = 1521)
)
)
(CONNECT_DATA = (SID = orcl)
(GLOBAL_NAME=PGVL.ORCL)
)
)

I have setup GLOBAL_NAMES =FALSE on PGVL DB but had set GLOBAL_NAMES=TRUE on the Target DB ORCL.

DB Link status at DBA Studio shows 'NOT ACTIVE'.

When I pass the following command at PVL schema on PGVL DB,I get following errors:

SQL> conn pvl/pvl@pgvl
Connected.

SQL> select count(*) from pvl.department_master@pgvl.orcl;
select count(*) from pvl.department_master@pgvl.orcl
*
ERROR at line 1:
ORA-02019: connection description for remote database not found


SQL> select count(*) from pvl.department_master @pgvl.orcl. itminfotech.local;
ERROR at line 1:
ORA-02019: connection description for remote database not found

Now to connect to remote DB ORCL from PGVL DB,I have to give the domain name as well otherwise Oracle refuses connection as follows:

SQL> conn pvl/pvl@orcl
ERROR:
ORA-12154: TNS:could not resolve service name


Warning: You are no longer connected to ORACLE.
SQL> conn pvl/pvl@orcl.itminfotech.local
Connected.
SQL>


Could anyone suggest as to what am I missing/doing wrong in the configuration.

Suggestion from anyone would be appreciated.

Thanks & regards,

Amit.