As we all know that Oracle is free and open business management software that is available for both personal and commercial use. Oracle database uses object-relational database management system that allows to process credit card payments, support and manages customer orders, handles customers, etc.
This networking software does the task of exchange of data between machines using underlying services to establish communication between the components. Establishment of communication happens due to some set of services, these services are known as Transparent Network Substrate (TNS). However, sometimes due to some uncertain reasons, when this service is taken into action, throws an error stated as ‘ORA-12560 TNS Protocol Adapter Error’
So, here, in this blog today, I will let you know how to fix ora-12560 tns protocol adapter error in easy ways. But before that, let us have a brief look at the Oracle TNS which throws an error.
About Oracle Transparent Network Substrate (TNS)
Transparent Network Substrate is a service that handles communication with oracle components with its database codes and pre-programmed schema. The acronym TNS occurs in various instances, when you get an error. TNS uses various protocols, which could be TCP/IP, DECNET, SPX/IPX, AppleTalk etc.
All these combination of TNS and the hidden protocols used to help in networking makes the connection establish between components. The Oracle Transparent Network Substrate (TNS) facilitates simple inter-database communication and has an built-in management layer over the standard network topology. But sometimes there may occur some communication error while connecting to the database. And one of the errors is ORA-12560 TNS Protocol Adapter Error which happens whenever there is a problem in accessing a specific server of the database.
What is ORA-12560 TNS Protocol Adapter Error?
ORA-12560 TNS Protocol Adapter Error takes place due to several reasons, but the most common is the server problem. This problem arises when a user does not specify which database or server was being accessed or there may be incorrect password provided to the database. Instead of giving exact reasons for the connection error, Oracle simply prompts ORA-12560 TNS Protocol Adapter Error. In short, if you want to troubleshoot this error, then you have to ensure the following:
- Listener is up and pointing to the desired database service
- Database service is up
- Oracle variables are configured in a correct manner which includes ORACLE_BASE, ORACLE_HOME, ORACLE_SID, PATH, TNS_ADMIN
- Cross check the firewall and the network configurations
- Full access is applicable to ORACLE_HOME including its sub-directories
Ways To Fix ORA-12560 TNS Protocol Adapter Error
Here are the best ways you can try to fix ORA-12560 TNS Protocol Adapter Error. Try them one by one and see which fix works in your case. Let’s get started with the first solutions…..
Fix #1: Set Correct ORACLE_SID
If you are running on a server that is running the database (i.e. database is local to machine) then it is important to first make sure that you have set a correct ORACLE_SID. If it is set correctly then it is good and if not then you have to try the below steps:
First of all, go to the command prompt and then run the below command:
- Set Oracle Database SID as
- Next, run Net Start command
Net start oracleserviceORCL
Fix #2: Check The Service Name ‘Oracleservice<SID>’ Ties Up With The Actual Database SID
Another method you can try to fix ora-12560 tns protocol adapter error is to check the service name ties up with the actual database SID. If, in any case, database SID changes without recreating service then this can lead this error. In this case, you have to recreate this service by following this step:
oradimxx -delete -sid <old-sid>
oradimxx -new -sid <SID> –intpwd <internal-password> AUTO –pfile <full-init-ora-filename>
Fix #3: Restart The Oracle Service
If the above method doesn’t work, maybe the OracleService for the database is not running. Check for the service, if it is not running then starts the service. If it is running then restart the service. To do so, you have to follow the below steps:
- First of all, you have to go to Start option.
- Next, you have to type Run and open it.
- Now, on the dialogue box, you have to type services.msc and then hit Enter.
- After this, you have to navigate to find OracleServicesORCL and then select the service and simply click on Start to initiate oracle database server if it’s not already running.
- After it has been done and running, from the command prompt run the following:
Tnsping<tnsalias> (tnsalias entry you can find it in tnsnames.ora file)
Fix #4: Try Oracle File Repair Tool To Fix ORA 12560: TNS: protocol adapter Error
If the above guides are out of your mind and you are perplexed what to do and wonder now how to fix ORA 12560 TNS protocol adapter error then don’t worry. For your rescue, there is a tool named Oracle File Repair Tool which will help you out. This tool doesn’t require any technical knowledge to use the steps.
Steps To Fix ORA 12560 TNS Protocol Adapter Using Tool
Step 1: Run Oracle File Repair Tool and you would see options to select or search corrupt Oracle databases in your computer.
Step:2 Click on Scan File to start the scan process after selecting the oracle database. On the left-side pane, recoverable objects get listed.
Step 3: Click an object to see its preview.
Step 4: : Click Start Repair in the icon bar to start the repair process. A prompt message occurs which will guide you further. Click next and continue.
Step 5: Provide user name, password and path of the blank database where you want to save the repaired database objects.
Step 6: Repairing and restoring various database objects after establishing a connection with blank oracle database.
This way you could fix ORA 12560: TNS protocol adapter error. Hope it helps.
While using Oracle database if you ever come across and error stated as ‘ora-12560 tns protocol adapter error’ then you have come to the right place. I am saying so because I have already mentioned here the best fixes you can try to fix ora-12560 tns protocol adapter error.
All these fixes are easy to apply and the best part is that you do not need any technical knowledge to perform these fixes. All you have to do is to just follow the step by step guide to resolve ora-12560 tns protocol adapter error.
Jacob Martin is a technology enthusiast having experience of more than 4 years with great interest in database administration. He is expertise in related subjects like SQL database, Access, Oracle & others. Jacob has Master of Science (M.S) degree from the University of Dallas. He loves to write and provide solutions to people on database repair. Apart from this, he also loves to visit different countries in free time.