Home » RDBMS Server » Server Administration » Connection failed from Oracle XE in Windows (Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for 64-bit Windows: Version 11.2.0.2.0 - Product)
Connection failed from Oracle XE in Windows [message #656198] Wed, 28 September 2016 04:39 Go to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

Hi

Using sqlplus I can connect to Oracle DB user.

Please see the file ConnXEsqlplus.PNG.
/forum/fa/13269/0/

But if I try to connect to same user using SQL Developer, I am getting the error message like 'Network Adapter could not establish the connection'.

In SQL Developer I have provided the information Username,Password, Hostname: localhost, Port: 1521, SID: XE

What could be the reason?

Regards
Mokarem
Re: Connection failed from Oracle XE in Windows [message #656200 is a reply to message #656198] Wed, 28 September 2016 05:50 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
are OS Services started for both Listener & database?

Post results from following OS commands


lsnrctl status
lsnrctl service
Re: Connection failed from Oracle XE in Windows [message #656203 is a reply to message #656200] Wed, 28 September 2016 06:39 Go to previous messageGo to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

Below is outcome those OS commands



C:\Users\smokarem>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 28-SEP-2016 17:36:24

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DACW0131.internal.imsglobal.com)(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
64-bit Windows Error: 1004: Unknown error

C:\Users\smokarem>lsnrctl service

LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 28-SEP-2016 17:37:17

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DACW0131.internal.imsglobal.com)(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
64-bit Windows Error: 1004: Unknown error

C:\Users\smokarem>


Re: Connection failed from Oracle XE in Windows [message #656204 is a reply to message #656203] Wed, 28 September 2016 06:43 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?

Post results from following OS commands

LSNRCTL START
Re: Connection failed from Oracle XE in Windows [message #656205 is a reply to message #656204] Wed, 28 September 2016 06:50 Go to previous messageGo to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

Here it is:


C:\Users\smokarem>lsnrctl start

LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 28-SEP-2016 17:49:22

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

Starting tnslsnr: please wait...

TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error


C:\Users\smokarem>

Re: Connection failed from Oracle XE in Windows [message #656206 is a reply to message #656205] Wed, 28 September 2016 06:58 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?
are OS Services started for both Listener & database?

PLEASE answer the question above.
Re: Connection failed from Oracle XE in Windows [message #656207 is a reply to message #656206] Wed, 28 September 2016 07:03 Go to previous messageGo to next message
gazzag
Messages: 1119
Registered: November 2010
Location: Bedwas, UK
Senior Member
Post the results of the following commands please:
C:\>sc query OracleServiceXE
C:\>sc query OracleXETNSListener
Re: Connection failed from Oracle XE in Windows [message #656208 is a reply to message #656206] Wed, 28 September 2016 07:04 Go to previous messageGo to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

Sorry for my mistake.

Here is the OS services' status:

/forum/fa/13270/0/
Re: Connection failed from Oracle XE in Windows [message #656209 is a reply to message #656208] Wed, 28 September 2016 07:11 Go to previous messageGo to next message
gazzag
Messages: 1119
Registered: November 2010
Location: Bedwas, UK
Senior Member
Start the OracleXETNSListener service.
Re: Connection failed from Oracle XE in Windows [message #656210 is a reply to message #656209] Wed, 28 September 2016 07:18 Go to previous messageGo to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

I tried to 'start' the OracleXETNSListener service.

Getting below error:

/forum/fa/13271/0/
Re: Connection failed from Oracle XE in Windows [message #656211 is a reply to message #656210] Wed, 28 September 2016 07:20 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
When was the last time the Listener ran without error?
What changed since then?
Re: Connection failed from Oracle XE in Windows [message #656212 is a reply to message #656211] Wed, 28 September 2016 07:25 Go to previous messageGo to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

Couple of days ago it was ok.

lastly MS Office 2013 was installed.
Some others tasks were performed on my laptop by our network support team.

That's all.

Today I am trying to connect to my local DB (XE) for some testing and getting the error.
Re: Connection failed from Oracle XE in Windows [message #656215 is a reply to message #656212] Wed, 28 September 2016 07:59 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Quote:
Some others tasks were performed on my laptop by our network support team.
Ah! You probably have a diifferent host name or domain name or IP address now, and the listener has the old one specified in its listener.ora file.
Re: Connection failed from Oracle XE in Windows [message #656216 is a reply to message #656212] Wed, 28 September 2016 08:02 Go to previous messageGo to next message
gazzag
Messages: 1119
Registered: November 2010
Location: Bedwas, UK
Senior Member
If John is right, the following Oracle support document may also help:

"The OracleXETNSListener service on the local computer started then stopped" Or "Windows System Error 1067" When Attempting To Start The Oracle XE Listener After Changing Hostname (Doc ID 1306009.1)

[Edit:typo]

[Updated on: Wed, 28 September 2016 08:04]

Report message to a moderator

Re: Connection failed from Oracle XE in Windows [message #656226 is a reply to message #656215] Wed, 28 September 2016 22:25 Go to previous messageGo to next message
mokarem
Messages: 109
Registered: November 2013
Location: Dhaka
Senior Member

Thanks John!

I have checked the Computer Name just now and found it is changed.

I have used the new Computer Name in listener.ora file and re-start the listener.

It is ok now.
Re: Connection failed from Oracle XE in Windows [message #656238 is a reply to message #656226] Thu, 29 September 2016 06:59 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
mokarem wrote on Wed, 28 September 2016 22:25
Thanks John!

I have checked the Computer Name just now and found it is changed.

I have used the new Computer Name in listener.ora file and re-start the listener.

It is ok now.
Most use cases do not even require a listener.ora file. Only if you have a demonstrated need for static instance registration or some specific run-time parameters. With no listener.ora, the listener is quite happy to start with all default values, which is fine for most cases. And with that, you'd be impervious to changes like you describe.

The knowledge that network guys had made changes should have been raising questions in your own mind from the very beginning and should have been mentioned in your opening post. This is basic troubleshooting, apart from any level of knowledge. "It worked yesterday. It doesn't work today. Something had to have changed. What changed? Oh, well, the network guys made some changes . . . "
Re: Connection failed from Oracle XE in Windows [message #656239 is a reply to message #656226] Thu, 29 September 2016 07:53 Go to previous message
gazzag
Messages: 1119
Registered: November 2010
Location: Bedwas, UK
Senior Member
But thanks for the feedback Smile
Previous Topic: Granting Create Access
Next Topic: Default unique index on primary key.
Goto Forum:
  


Current Time: Thu Nov 28 16:28:56 CST 2024