Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1578
  • Last Modified:

ORA-12541 error with Toad

I'm trying to compare data from 2 remote tables.

I have Toad for Oracle Version 9.6.1.1 and can connect to these remote servers fine. I am trying to create a datbase link but i'm recieving the following error.

Error : ORA-12541: TNS:no listener

I've read that you need to run lsnrctl, but this isn't installed on my machine.
0
CurtinProp
Asked:
CurtinProp
  • 2
  • 2
1 Solution
 
schwertnerCommented:
They mean the listener on the remote machine where the server resides,
not at the client machine where TOAD resides.
To use TOAD you have to have installed Oracle client.
In the    \network\admin subdirectory find the file
tnsnames.ora file and add entry for the remote instance.
Check if you can connect to the remote instance using SQL*Plus.

After that TOAD will be able to connect.

On the remote instance you can investiogate the Listener:

%  lsnrctl status
% lsnrctl services

Eventually you start it:

% lsnrctl start
0
 
CurtinPropAuthor Commented:
So just to clarify, I already have the Oracle client installed and toad is working but not with database links. To get this working I have to get the listener working on the remote server?

On a side note I have oracle 9 installed and it isn't installed to the network/admin sub directory.
0
 
schwertnerCommented:
Database links are defined on the database not in TOAD.
TOAD uses it if it is defined in the DB to which are it connected.

How to create DBLINK:

On MAIN instance:

grant create database link to lsmedical (from OEM!!!)

connect lsmedical/lsmedical@main

drop database link bugf;

create database link bugf
connect to lsmedical identified by lsmedical
using 'bugfix';

/* alias 'bugfix' shoud exist in tnsnames.ora */

insert into usermedbasic_current@bugf select * from usermedbasic_current;
  1164 rows created.

commit;
0
 
DauheeCommented:
the tnsnames.ora on the database needs to have the link target database entry.

You can then retest the link you have created in toad. If you can connect to the remote databases with toad, then the database listeners are ok and DONT need changing :)
0
 
CurtinPropAuthor Commented:
thanks
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now