We know that there are several configuration files involved in Oracle Client connection: Sqlnet.ora, Tnsnames.ora, Listener.ora. Where Sqlnet.ora and Tnsnames.ora are configuration files on the client, Listener.ora is the listener profile on the server side.
To successfully connect to the server side, first make sure the network between the two is unobstructed. Second, configure the listener on the server. The third is the client configuration of the corresponding Tnsnames.ora.
There are several points to note when configuring server-side listeners:
1, in the server/etc/hosts file need to have 127.0.0.1 localhost this one. By default. If not, the boot listener will report tns-12537:tns:connection closed error. It is also best to add your server IP host name.
2, configure the listener can use NETCA or directly write the configuration file Listener.ora also line
# Listener.ora Network Configuration File:/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = Plsextproc)
(Oracle_home =/u01/app/oracle/product/10.2.0/db_1)
(program = Extproc)
)
)
LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.120) (PORT = 1521))
)
)
The host is best used IP, the hostname may change-the impact is more.
The main configuration of the client is Tnsnames.ora this file
CENTOS =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.56.120) (PORT = 1521))
)
(Connect_data =
(SID = CentOS)
(SERVER = dedicated)
)
)
Actually, there's nothing.
For Sqlnet.ora this file names.directory_path= (TNSNames, ezconnect) This parameter, where Ezconnect is a new addition to oracle10g, it seems to be used for fast connection. Use host name easy to connect the server off. Do not connect in a tnsnames way.
All the settings are ready, if you still find that the client (Windows) cannot connect to the server-side (Linux), see if the firewall on the server is open to the 1521 port of Oracle. It is not very important to practice the machine can be directly shut down the firewall.
1) Permanent, no recovery after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
2) immediate effect, recovery after restart
Open: Service iptables start
Close: Service iptables stop
Finally, the following are some of the commands used in the row: Lsnrctl (Start, stop, status), tnsping (ip/hostname), NETSTAT-ANP (view port), Telnet, and so on.
333333333333333333333333333333333333333
Native connection time: Connect/as Sysdba appears:
ERROR:ORA-12560:TNS: Protocol Adapter error
Workaround: After checking, because the computer was installed before the second database test, today after the deletion of it, did not change the corresponding SID in time to cause this problem.
So go to regedit to modify the hkey_local_machine/softeware/oracle environment variable ORACLE_SID set to xxx,xxx for the database SID, this machine for the ORCL, changed to ORCL on it.
After reviewing the information, we found that there are two other situations to note:
1. See if the host values in the database configuration files Listener.ora and Tnsnames.ora point to this machine correctly. 2. View the listener in the registry hkey_local_machine/system/currentcontrolset/ Services/oracl******lister ImagePath If there is a value, if not add its value, point to your Oracle database, such as my native value is E:\oracle\product\10.2.0\db_1\BIN\ TNSLSNR44444444444444444
Case:
Microsoft Windows [version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\user1>lsnrctl
Lsnrctl for 32-bit windows:version 9.2.0.7.0-production on 2 July-August-2008 09:33
: 43
Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, please type "help" for information.
lsnrctl> status
Connecting to (Description= (address= (PROTOCOL=IPC) (Key=extproc1))
Tns-12541:tns: No Listener
TNS-12560:TNS: Protocol Adapter error
TNS-00511: No Listener
32-bit Windows error:2: No such file or directory
Connecting to (Description= (address= (protocol=tcp) (host=192.168.0.55) (port=1521))
Tns-12538:tns: No this Protocol adapter
TNS-12560:TNS: Protocol Adapter error
TNS-00508: No such protocol adapter
Lsnrctl> start
Start Tnslsnr: Please wait ...
Tnslsnr for 32-bit windows:version 9.2.0.7.0-production
System parameter file is D:\oracle\ora92\network\admin\listener.ora
Log information written to D:\oracle\ora92\network\log\listener.log
Monitoring: (Description= (Address= (PROTOCOL=IPC) (PIPENAME=\\.\PIPE\EXTPROC1IPC)))
An error occurred while listening for this object: (Description= (Address= (protocol=tcp) (host=192.168.0.55) (port=
1521)))
Tns-12538:tns: No this Protocol adapter
TNS-12560:TNS: Protocol Adapter error
TNS-00508: No such protocol adapter
The listener failed to start. See the error message above ...
---------------------------
Service
---------------------------
The Oracleorahome92tnslistener service cannot be started on the local computer.
Error 1067: The process terminated unexpectedly.
---------------------------
Are you sure
---------------------------
==============================================================
Ora-12560:tns: Resolution of protocol Adapter errors
There are three reasons why the Ora-12560:tns: Protocol adapter error is a problem:
1. The monitoring service is not up. Windows platform: Start---program---management tools---services, open the Services panel, start the Oraclehome92tnslistener service.
2.database instance did not rise up. The Windows platform: start---program---management tools---services, open the Services panel, start oracleservicexxxx,xxxx is your database SID.
3. Registry issues. Regedit and then go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 set the environment variable ORACLE_SID to XXXX,XXXX is your database Sid. Or right My Computer, attribute--advanced--environment variable---system variable--new, variable name =oracle_sid, variable value =xxxx,xxxx is your database SID. Or enter sqlplus before the command Line down the set ORACLE_SID=XXXX,XXXX is your database SID.
After the above steps, you can solve the problem.
=======================================
TNS: There are three reasons for the problem with the protocol adapter error:
1. The monitoring service is not up. Windows platform: Start---program---management tools---services, open the Services panel, start the Oraclehome92tnslistener service.
2.database instance did not rise up. The Windows platform: start---program---management tools---services, open the Services panel, start oracleservicexxxx,xxxx is your database SID.
3. Registry issues. Regedit and then go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 set the environment variable ORACLE_SID to XXXX,XXXX is your database Sid. Or right My Computer, attribute--advanced--environment variable---system variable--new, variable name =oracle_sid, variable value =xxxx,xxxx is your database SID. Or enter sqlplus before the command Line down the set ORACLE_SID=XXXX,XXXX is your database SID.
After the above steps, you can solve the problem
1, Ora-12541:tns: No listener
Cause: There is no boot listener or the listener is corrupted. If the former, use the command net start Oracleorahome81tnslistener (the name may differ), and if the latter, use the Net8 Configuration
Assistant "Tool Wizard" listener configuration Add a listener (basically do not write any information, all the way OK.) You may need to remove all the listeners before adding them! )
2. Ora-12500:tns: Listener cannot start dedicated server process or ORA-12560:TNS: Protocol adapter error
Cause: Oracle's database service is not started. You can use the command net start oracleserviceoradb (oradb as the database name). If it's still not resolved, keep looking down.
3. If the database service fails to start, it is most likely that its registry key value is corrupted, and the best practice is to do the following two steps:
1) Oradim-delete-sid oradb Delete database service item
2) Oradim-new-sid oradb New database service entry
Note: If there is an error in this process, restart the computer!
4, Ora-12154:tns: Can resolve the service name
Cause: The Network Service name for Oracle is not configured correctly. Use the local network service name configuration in the Net8 Configuration Assistant Tool Wizard to configure TNS. If it's still not resolved, keep looking down.
5. Ora-1034:tns:oracle Not Available
Cause: The Oracle database service started correctly, but the database is not open!
Use the command:
1) SVRMGRL start Service Manager
2) Connect internal login as internal
3) Startup Open database
6, Ora-12560:tns: Protocol adapter error (stubborn)
Cause: Unknown.
Solution: Must kill skill--open "Windows Task Manager", kill ORACLE.exe and ORADIM.exe process, write your own
Ora_startup.bat, execute it!
Ps:
1. My ora_startup.bat:
net start Oracleorahome81tnslistener
net start oracleserviceoradb
SVRMGRL generally do not use, but sometimes it is necessary, the concrete steps to see the 5th step.
2. My ora_shutdown.bat:
net stop Oracleorahome81tnslistener
net stop oracleserviceoradb
oracle_home=/u01/app/oracle/product/8.1.6
Export oracle_home/includes the directory of ORACLE Software/
Ld_library_path=/u01/app/oracle/product/8.1.6/lib;
Export Ld_library_path
Oracle_base=/u01/app/oracle
Export oracle_base/includes the directory of ORACLE software and the directory of management software
Oracle_sid=orcl
Export Oracle_sid/identity of the default database/
oracle_term=vt100
Export Oracle_term
ora_nls33=/u01/app/oracle/product/8.1.6/
Ocommon/nls/admin/data
Export ORA_NLS33/Language support/
Path= $PATH:/u01/app/oracle/product/8.1.6/bin
Export PATH
=============================================
ORA-12560 starting LISTENER on nt-troubleshooting
---------------------------------------------------
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 are complete.
This was a high level error just reporting an error occurred in the actual transport layer. Look at the next error down the stack and process that.
1.-starting Listener with TCP/IP Protocol
Problem:
You start the TNS Listener from command line and the TCP/IP address fails with a TNS-12560.
Solution:
Check if Microsoft Winsock Proxy (WSP) Client is-enabled on the Windows NT Server, if that's the case and go to Windows C Ontrol Panel, click WSP icon and select the Disable Proxy Client option.
Explanation:
The Winsock application may fail to bind to a specific port in a proxy Server computer when the Winsock is running Proxy C Lient.
2.-TNS-12560 TNS-512 starting the listener.
Problem:
You try to start up the listener and receive the following error stack:
Tns-12542:tns:address already in use
Tns-12560:tns Protocol Adapter Error
Tns-00512:address already in use
32-bit Windows Error:48:unknown Error
Error:tns 512
Text:address already in use
--------------------------------------------
Cause:specified listener address is already being used.
Action:start your listener with an unused address.
Generally this problem could ocurr for a incorrect setting in the Listener.ora. Some causes of this problems may:
a.-Some defined address in the Listeners.ora is been used. Make sure other listeners is not running. Either listener.log and screens output appear the address with problem.
b.-Just for 8i:in Windows NT the algorithm to acquire
The address has a change, please check the Note 69026.1:oracle 8i and socket LISTEN operations.
Explanation:
The listener would try to acquire the address in exclusive mode, and if this is been used and the process to get it would fail.
3.-starting the Listener the errors ora-12203,ora-12560, NL-462 or NL-427 may raised.
Problem:
You try-to-start up the listener and receive the following errors
ora-12203,ora-12560, NL-462 or NL-427.
Solution:
Recreate the Listener.ora file.
Explanation:
Some corruption in the Listener.ora could get unable to the Tnslsnr into work adequatly.
4.-Failed to start service, TNS-12560, TNS-00530 when create new listener services
Problem:
To recreate Oracle TNS listener service on Windows NT, you delete the service entry in registry. When using Lsnrctl to start the listener, you get the following errors:
Lsnrctl> start
Starting Tnslsnr:please Wait ...
Failed to start service, error 3.
Tns-00530:protocol Adapter Error
The Listener service is not recreated and the Listener would not start.
You are using a valid Listener.ora file and protocol adapters.
Solution:
After you delete the Listener service from registry, you have to reboot NT for it to take effect. Then you can use Lsnrctl to start the Listener, which would re-create the Listener service.
Explanation:
The Listener service is marked ' disabled ', but it still exists after you delete the service from registry.
555555555555555555555555555555555
Oracle Protocol Adapter Error Resolution
Create a new database in Oracle, delete it today and then log on to Sql*plus, and there is a ORA-12560:TNS: Protocol adapter error.
Ora-12560:tns: Resolution of protocol Adapter errors
There are three reasons why the Ora-12560:tns: Protocol adapter error is a problem:
1. The monitoring service is not up. Windows platform: Start---program---management tools---services, open the Services panel, start the Oraclehome92tnslistener service.
2.database instance did not rise up. The Windows platform: start---program---management tools---services, open the Services panel, start oracleservicexxxx,xxxx is your database SID.
3. Registry issues. Regedit and then go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 set the environment variable ORACLE_SID to XXXX,XXXX is your database Sid. Or right My Computer, attribute--advanced--environment variable---system variable--new, variable name =oracle_sid, variable value =xxxx,xxxx is your database SID. Or enter sqlplus before the command Line down the set ORACLE_SID=XXXX,XXXX is your database SID.
After the above steps, you can solve the problem.
=======================================
1, Ora-12541:tns: No listener
Cause: There is no boot listener or the listener is corrupted. If the former, use the command net start Oracleorahome81tnslistener (the name may differ), and if the latter, use the Net8 Configuration
Assistant "Tool Wizard" listener configuration Add a listener (basically do not write any information, all the way OK.) You may need to remove all the listeners before adding them!)
2. Ora-12500:tns: Listener cannot start dedicated server process or ORA-12560:TNS: Protocol adapter error
Cause: Oracle's database service is not started. You can use the command net start oracleserviceoradb (oradb as the database name). If it's still not resolved, keep looking down.
3. If the database service fails to start, it is most likely that its registry key value is corrupted, and the best practice is to do the following two steps:
1) Oradim-delete-sid oradb Delete database service item
2) Oradim-new-sid oradb New database service entry
Note: If there is an error in this process, restart the computer!
4, Ora-12154:tns: Can resolve the service name
Cause: The Network Service name for Oracle is not configured correctly. Use the local network service name configuration in the Net8 Configuration Assistant Tool Wizard to configure TNS. If it's still not resolved, keep looking down.
5. Ora-1034:tns:oracle Not Available
Cause: The Oracle database service started correctly, but the database is not open!
Use the command:
1) SVRMGRL start Service Manager
2) Connect internal login as internal
3) Startup Open database
6, Ora-12560:tns: Protocol adapter error (stubborn)
Cause: Unknown.
Solution: Must kill skill--open "Windows Task Manager", kill ORACLE.exe and ORADIM.exe process, write your own
Ora_startup.bat, execute it!
Ps:
1. My ora_startup.bat:
net start Oracleorahome81tnslistener
net start oracleserviceoradb
SVRMGRL generally do not use, but sometimes it is necessary, the concrete steps to see the 5th step.
2. My ora_shutdown.bat:
net stop Oracleorahome81tnslistener
net stop oracleserviceoradb
oracle_home=/u01/app/oracle/product/8.1.6
Export oracle_home/includes the directory of ORACLE Software/
Ld_library_path=/u01/app/oracle/product/8.1.6/lib;
Export Ld_library_path
Oracle_base=/u01/app/oracle
Export oracle_base/includes the directory of ORACLE software and the directory of management software
Oracle_sid=orcl
Export Oracle_sid/identity of the default database/
oracle_term=vt100
Export Oracle_term
ora_nls33=/u01/app/oracle/product/8.1.6/
Ocommon/nls/admin/data
Export ORA_NLS33/Language support/
Path= $PATH:/u01/app/oracle/product/8.1.6/bin
Export PATH
666666666666666666666666
Should be oracle_sid caused, you can add SID access to Sqlplus "[email protected] as SYSDBA", if you can, you can add a oracle_sid in the environment variable to try. Add a method, right click My Computer/Properties/System Configuration/environment variable/NEW
Ask
I used your sqlplus "[email protected] as sysdba" method, it is really connected to normal, but I do not understand, this is why? Didn't I use set oracle_sid=lcam before, but why didn't it work? That's what you did before, please don't hesitate to enlighten me.
This can be connected, but when I use the data pump to back up the data, the protocol adapter error will still be reported, setting ORACLE_SID in environment variables is not working.
Chase Answer
Windows parameter call is%var%
You can try set oracle_sid= "Lcam" or set oracle_sid= "Lcam".
There is also a parameter tns_admin= to store the Tnsnames.ora path.
According to the actual situation test, you can study instantclient, a few parameters set up, how to access all can.
Problem with protocol adapter error