Link to home
Start Free TrialLog in
Avatar of sikyala
sikyalaFlag for United States of America

asked on

How do I fix my listener so that I can connect to my database through a 3rd party tool (Toad)

When I try to log into Toad I get the error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

When I type lsnrctl services I see several instance of my database:
Service "gabjos" has 2 instance(s).
  Instance "gabjos", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:1 refused:0
         LOCAL SERVER
  Instance "gabjos", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:148 refused:0 state:ready
         LOCAL SERVER
Service "gabjosXDB" has 1 instance(s).
  Instance "gabjos", status READY, has 1 handler(s) for this service...
    Handler(s):
      "D000" established:0 refused:0 current:0 max:1002 state:ready
         DISPATCHER <machine: <computer mame>, pid: 3496>
         (ADDRESS=(PROTOCOL=tcp)(HOST=<host info>)(PORT=
1117))
Service "gabjos_XPT" has 1 instance(s).
  Instance "gabjos", status READY, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:148 refused:0 state:ready
         LOCAL SERVER

I only have 1 entry for my database gabjos in my listener and tnsnames.ora. I don't know where all of these other instances are coming from or how to fix this. Does anyone know how to troubleshoot this and fix it so that I can get into the database through Toad? The database is located in the same location as Toad.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

>>I don't know where all of these other instances are coming from
XDB is Oracle XML database.  
XPT is dataguard.

They shouldn't be and problem unless you just don't want them.


Check your sqlnet.ora file for a domain entry.  If it has one, try commenting it out.
can you connect with sqlplus?
BTW do you have multiple oracle homes on the server that may confues TOAD a bit and what version of TOAD do you use?

Avatar of sikyala

ASKER

I can connect to sqlplus at the command line but not in the sqlplus application. I only have 1 oracle_home
Now you have me confused.  sqlplus is a stand-alone utility provided by Oracle.  

What do you mean by the sqlplus application?
Avatar of sikyala

ASKER

I am in a windows environment and there is a sqlplus tool under start --> programs --> oracle home --> application development --> Oracle SQL plus a dialog box opens for you to enter the user name, password and host string. I can't connect to the database through this application or Toad. But if I open a windows command prompt and type sqlplus "<user name>/<password>" I can connect to the database successfully.

ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sikyala

ASKER

Toad version 8
Avatar of sikyala

ASKER

I only have 1 oracle home
>>I only have 1 oracle home
Then sqlplusw.exe (the windows version) and sqlplus.exe (the command line version) should both connect.

From the Start menu right-click on the sqlplus icon and select properties.  Look where it is being executed from.

The from the command prompt look at the PATH environment variable.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sikyala

ASKER

I changed the service name so that it didn't contain the domain name just the Oracle SID