Home » RDBMS Server » Networking and Gateways » ORA-12560: TNS:protocol adapter error (windows 7 , database 10g)
ORA-12560: TNS:protocol adapter error [message #538784] Mon, 09 January 2012 07:16 Go to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
Dear all
I have a strange issue
I installed local database on my laptop

that pc is inside a domain
when i remove the network cable and
connect using the sid defined in the tnsnames
sys/sys@ora10g as sysdba
it gives me that errors
ORA-12560: TNS:protocol adapter error

to resolve this problem i should connect like that
sys/sys as sysdba without the sid

but i don't want to connect in this way
because i have work must be done from home on that local
database so i don't want to connect with network
sys/sys@ora10g as sysdba
and without network
sys/sys as sysdba

i want to be always connect
sys/sys@ora10g as sysdba

is there any issue i could do to reslove this problem


Re: ORA-12560: TNS:protocol adapter error [message #538785 is a reply to message #538784] Mon, 09 January 2012 07:23 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Quote:
connect using the sid defined in the tnsnames


You should Use Tns alial to connect to the database sid.
If your alias is ora10g then
post the following results...
tnsping ora10g

Quote:
to resolve this problem i should connect like that
sys/sys as sysdba without the sid


Post results for
select '&_connect_identifier' from dual;
Re: ORA-12560: TNS:protocol adapter error [message #538788 is a reply to message #538784] Mon, 09 January 2012 07:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Post the content of ora10g entry in tnsnames.ora as well as your sqlnet.ora file.

Regards
Michel
Re: ORA-12560: TNS:protocol adapter error [message #538795 is a reply to message #538784] Mon, 09 January 2012 08:56 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
Dear ramoradba


result of tnsping ora10g is
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 09-JAN-2
012 15:35:31

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

Used parameter files:
d:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.163)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora10g
)))
TNS-12560: TNS:protocol adapter error



for this query
select '&_connect_identifier' from dual;

the result is
old 1: SELECT '&_CONNECT_IDENTIFIER' FROM DUAL
new 1: SELECT 'ora10g' FROM DUAL

ORA10
------
ora10g


[Updated on: Mon, 09 January 2012 09:00]

Report message to a moderator

Re: ORA-12560: TNS:protocol adapter error [message #538797 is a reply to message #538784] Mon, 09 January 2012 09:02 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
Dear Michel

the content of ora10g is
ORA10G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.163)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora10g)
)
)

the content of sqlnet.ora is

# sqlnet.ora Network Configuration File: d:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


Re: ORA-12560: TNS:protocol adapter error [message #538799 is a reply to message #538797] Mon, 09 January 2012 09:15 Go to previous messageGo to next message
John Watson
Messages: 8961
Registered: January 2010
Location: Global Village
Senior Member
Hi - think we need the output of three more commands:

ping 192.168.3.163
ipconfig
lsnrctl status

[update: typo]

[Updated on: Mon, 09 January 2012 09:15]

Report message to a moderator

Re: ORA-12560: TNS:protocol adapter error [message #538803 is a reply to message #538784] Mon, 09 January 2012 09:41 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
Dear john
the output of ping 192.168.3.163 is

Pinging 192.168.3.163 with 32 bytes of data:
Reply from 192.168.3.163: bytes=32 time<1ms TTL=128
Reply from 192.168.3.163: bytes=32 time<1ms TTL=128
Reply from 192.168.3.163: bytes=32 time<1ms TTL=128
Reply from 192.168.3.163: bytes=32 time<1ms TTL=128



the output of ipconfig is


Windows IP Configuration


Wireless LAN adapter Wireless Network Connection 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Wireless LAN adapter Wireless Network Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : lan

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::15a0:9256:7c95:dacc%10
IPv4 Address. . . . . . . . . . . : 192.168.3.163
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.1

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Tunnel adapter isatap.{4E8692A2-D88A-432C-9E2D-6520E2B27AFF}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :


the output of lsnctrl status is

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 09-JAN-2012 17:39
:13

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 - Produ
ction
Start Date 09-JAN-2012 13:22:02
Uptime 0 days 4 hr. 17 min. 11 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.o
ra
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=PCALB163.mansourgroup.corp)(PORT=152
1)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ora10g" has 1 instance(s).
Instance "ora10g", status READY, has 1 handler(s) for this service...
Service "ora10gXDB" has 1 instance(s).
Instance "ora10g", status READY, has 1 handler(s) for this service...
Service "ora10g_XPT" has 1 instance(s).
Instance "ora10g", status READY, has 1 handler(s) for this service...
The command completed successfully

Re: ORA-12560: TNS:protocol adapter error [message #538804 is a reply to message #538803] Mon, 09 January 2012 09:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
open Command Window & issue following OS command

sqlplus scott/tiger@'192.168.3.163:1521/ora10g'


COPY command & results then PASTE all back here

[Updated on: Mon, 09 January 2012 09:53]

Report message to a moderator

Re: ORA-12560: TNS:protocol adapter error [message #538807 is a reply to message #538784] Mon, 09 January 2012 09:58 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
Dear Blackswan

the output sqlplus scott/tiger@'192.168.3.163:1521/ora10g'

ERROR:
ORA-12560: TNS:protocol adapter error

Warning: You are no longer connected to ORACLE.


Re: ORA-12560: TNS:protocol adapter error [message #538809 is a reply to message #538807] Mon, 09 January 2012 10:05 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>ORA-12560 can result from OS/Networking mis-configuration.
How does system obtain IP# when NOT connected to the Network?
What is IP# when system not connected to the network?
Oracle is victim & not the culprit.
Problem root cause & fix is external to Oracle.
Re: ORA-12560: TNS:protocol adapter error [message #538812 is a reply to message #538784] Mon, 09 January 2012 10:15 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
Dear BlackSwan

the IP is static
I am not obtaining it automatically
i configure it
as i said before this laptop works inside a domain
and also it i can work from home
Re: ORA-12560: TNS:protocol adapter error [message #538815 is a reply to message #538812] Mon, 09 January 2012 10:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
ORA-12560: TNS:protocol adapter error
 *Cause: A generic protocol adapter error occurred.
 *Action: Check addresses used for proper protocol specification. Before
 reporting this error, look at the error stack and check for lower level
 transport errors. For further details, turn on tracing and reexecute the
 operation. Turn off tracing when the operation is complete.


Set TRACE_DIRECTORY_CLIENT, TRACE_FILE_CLIENT and TRACE_LEVEL_CLIENT and restart the operation and post the trace (in a formatted way: read How to use [code] tags and make your code easier to read; make sure that lines of code do not exceed 80 characters when you format; use the "Preview Message" button to verify).

Regards
Michel
Re: ORA-12560: TNS:protocol adapter error [message #538820 is a reply to message #538812] Mon, 09 January 2012 11:05 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Any Firewall ?
If so open port 1521 on your laptop(or server)

Sriram Sanka
Re: ORA-12560: TNS:protocol adapter error [message #538821 is a reply to message #538784] Mon, 09 January 2012 11:13 Go to previous messageGo to next message
emadnabil
Messages: 179
Registered: August 2007
Senior Member
the firewall is off
Re: ORA-12560: TNS:protocol adapter error [message #538823 is a reply to message #538807] Mon, 09 January 2012 11:21 Go to previous message
John Watson
Messages: 8961
Registered: January 2010
Location: Global Village
Senior Member
Could you have a problem with name resolution? Your listener is configured with a hostname, not with the IP address. Does that still resolve when you rip out the network cable?

If it were my environment, this is what I would do:
1. Stop the listener you have running now.
2. Create a new listener, listening on 127.0.0.1:1521
3. In the database instance,
alter system set local_listener='(address=(protocol=tcp)(host=127.0.0.1)(port=1521))';
alter system set service_names=ora10g;
alter system register;
4. sqlplus scott/tiger@127.0.0.1:1521/ora10g

And of course enable tracing, as Michel said.
Previous Topic: ERROR ORA-01034 ORACLE not available, ORACLE database is not started ?
Next Topic: ora-12170:TNS Connect TimeOut Error
Goto Forum:
  


Current Time: Wed Dec 11 15:22:19 CST 2024