Home » SQL & PL/SQL » Client Tools » how to connect database through toad
how to connect database through toad [message #179587] Wed, 28 June 2006 02:35 Go to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member


hi to all,
i have one proble when i m connecting to my database through
toad
it give me following error

"ora:12542 connection failed target host or object is not present"
my tnsname.ora file is as follows

# TNSNAMES.ORA Network Configuration File: F:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

STRATE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = admin)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sample)
)
)

SAMPLE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = admin)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sample)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = admin)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = Ro)
)
)

currently i m working on 'sample' database


can one explain me how to use toad
regards
tushar(jr DBA)
Re: how to connect database through toad [message #179600 is a reply to message #179587] Wed, 28 June 2006 03:06 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Are you sure that's the error you're getting?
ORA-12542 has the text TNS:address already in use ad is returned when trying to start a listener.

Debug 101:

Is the database up?

Is the listener running?

Can you connect to the database from SQL*Plus using the same connection details?
Re: how to connect database through toad [message #179609 is a reply to message #179600] Wed, 28 June 2006 03:43 Go to previous messageGo to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member


hi
thanku for your response
my database is running
how to know 'the listener is running'


regrds
tushar
Re: how to connect database through toad [message #179612 is a reply to message #179609] Wed, 28 June 2006 03:51 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you can connect to the Db through sqlplus then the answer is 'YES'

To check the listener status, from the command prompt:

H:\>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 28-JUN-2006 09:51:53

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date                20-JUN-2006 11:57:41
Uptime                    7 days 21 hr. 54 min. 14 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
Listener Log File         D:\oracle\product\10.2.0\db_1\network\log\listener.log

Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=noneofyourbusiness.net)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


So, what was the error message you were getting?

Re: how to connect database through toad [message #179614 is a reply to message #179612] Wed, 28 June 2006 03:59 Go to previous messageGo to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member

hi
i fire that command & the error is

12541: no listener
please tell me how to create listener
regards
tushar
Re: how to connect database through toad [message #179615 is a reply to message #179614] Wed, 28 June 2006 04:10 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Ok, DBA 101:

If you created your DB properly, there should be a file LISTENER.ORA in the same directory as your TNSNAMES.ORA

If this is the case, you should be able to use the command

lsnrctl start


to fire up the listener.

If that doesnt' work, or the file isn't there, you'll need to use the Net COnfiguration Assistant (supplied with the install) to set one up.
Re: how to connect database through toad [message #179623 is a reply to message #179615] Wed, 28 June 2006 04:33 Go to previous messageGo to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member



i just created the listener by net configuration
and try to start the listener but it still show error
ie listener failed to start.


regards
tushar
Re: how to connect database through toad [message #179628 is a reply to message #179623] Wed, 28 June 2006 04:43 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
And the whole text of the error was......

I'm good, but I'm not a mind reader.
Re: how to connect database through toad [message #179635 is a reply to message #179628] Wed, 28 June 2006 04:51 Go to previous messageGo to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member


hi,
this is the error



LSNRCTL> start
Starting tnslsnr: please wait...

TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production
System parameter file is F:\oracle\ora92\network\admin\listener.ora
Log messages written to F:\oracle\ora92\network\log\listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=admin)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
32-bit Windows Error: 1001: Unknown error

Listener failed to start. See the error message(s) above...

regards
tushar
Re: how to connect database through toad [message #179640 is a reply to message #179635] Wed, 28 June 2006 05:04 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Check the HOST is correct.
You should be able to go to the command prompt and type
ping admin


and get a non-error response back.
If you don't, then the value of HOST that you're using is probably incorrect.

Check the listener.log file for errors too.
Re: how to connect database through toad [message #179645 is a reply to message #179640] Wed, 28 June 2006 05:18 Go to previous messageGo to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member


thnks but,
when i fire that i get,
C:\>ping admin
Unknown host admin.


my listener log file is

TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Production on 28-JUN-2006 14:51:16

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

System parameter file is F:\oracle\ora92\network\admin\listener.ora
Log messages written to F:\oracle\ora92\network\log\listener1.log
Trace information written to F:\oracle\ora92\network\trace\listener1.trc
Trace level is currently 0

Started with pid=2236
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lily)(PORT=1521)))

TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
28-JUN-2006 14:51:18 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=lily))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER1)(VERSION=153092352)) * status * 0
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lily)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lily)(PORT=2100))(Presentation=FTP)(Session=RAW))
28-JUN-2006 14:51:47 * service_register * strate * 0
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lily)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lily)(PORT=2100))(Presentation=FTP)(Session=RAW))
28-JUN-2006 14:51:47 * service_register * sample * 0
28-JUN-2006 14:56:49 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=lily))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Lil y)(PORT=1521))))(VERSION=153092352)) * status * 0
28-JUN-2006 15:01:47 * service_update * strate * 0
28-JUN-2006 15:01:47 * service_update * sample * 0
28-JUN-2006 15:10:51 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=lily))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Lil y)(PORT=1521))))(VERSION=153092352)) * status * 0
28-JUN-2006 15:11:41 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=lily))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Lil y)(PORT=1521))))(VERSION=153092352)) * status * 0
28-JUN-2006 15:11:48 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=lily))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Lil y)(PORT=1521))))(VERSION=153092352)) * status * 0
28-JUN-2006 15:11:50 * service_update * strate * 0
28-JUN-2006 15:11:50 * service_update * sample * 0
28-JUN-2006 15:31:56 * service_update * sample * 0
28-JUN-2006 15:41:59 * service_update * sample * 0
pls tell me how to correct that host
thank u

tushar
Re: how to connect database through toad [message #179647 is a reply to message #179645] Wed, 28 June 2006 05:23 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Right - your host is wrong.
It needs to be the address of the machine where the oracle Db is located.
Re: how to connect database through toad [message #179651 is a reply to message #179647] Wed, 28 June 2006 05:38 Go to previous messageGo to next message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member

hi
but how to get the address of machine to change the host.
plz tell me becs i didnt get what u reply plz.

regards
tushar
Re: how to connect database through toad [message #179658 is a reply to message #179651] Wed, 28 June 2006 05:57 Go to previous messageGo to next message
Littlefoot
Messages: 21575
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

plz tell me becs i didnt get what u reply plz.
What kind of a language is this?

On-topic: ask your DBA to tell you the required address; even better, ask HIM to set your computer up in order to enable it to connect to the database.

If we assume that ADMIN is the host alias, you'll have to add it to the "hosts" file (located here: C:\WINDOWS\system32\drivers\etc). Otherwise, enter its IP address into the TNSNAMES.ORA file.

If the database is running on your local PC, you could use either "localhost" or 127.0.0.1 as the host address.
Re: how to connect database through toad [message #179660 is a reply to message #179651] Wed, 28 June 2006 05:59 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
tushar_spatil wrote on Wed, 28 June 2006 12:38

plz tell me becs i didnt get what u reply plz.
link

MHE

[Updated on: Wed, 28 June 2006 05:59]

Report message to a moderator

Re: how to connect database through toad [message #179674 is a reply to message #179660] Wed, 28 June 2006 06:49 Go to previous message
tushar_spatil
Messages: 12
Registered: June 2006
Location: mumbai
Junior Member

hi
I am really sorry for that language.
I just change host=IP address as shown below
here is my tnsnamefile# TNSNAMES.ORA Network Configuration File: F:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

STRATE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.15.250)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sample)
)
)

SAMPLE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.15.250)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sample)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.15.250)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ans still I get that problem
regards
tushar

Previous Topic: Looking for a TOAD forum
Next Topic: printing spaces before text in sqlplus editor
Goto Forum:
  


Current Time: Fri Jul 10 01:06:26 CDT 2020