[Fix]-Not able to access oracle database on other computer
Not able to access oracle database on other computer
Scenario:
There are two machines (PC1 and PC2). The requirement is to access oracle database from PC1 to PC2.
Oracle 11g database is installed on PC1 and Oracle 11g client(Admin) on the other machine PC2.
For accessing database on PC2 following things have been performed:
- Updated tnsname.ora file - location as E:\app\IT\product\11.2.0\client_1\network\admin
- Entry into path variable given as E:\app\IT\product\11.2.0\client_1\network\admin
- Restarted PC2.
Now SQL Plus is accessed from oracle-oraClient11g_home -> Application Development -> sql plus
Sql plus requires user name and password. On providing the same it throws the below error: ORA-12560: TNS: protocol adapter error.
Reason:
The path variable is not set properly or there is an issue with user access rights.
Fix:
Performs the following checks:
- Check $ORACLE_HOME and $PATH variables.
- Check for the permissions on client PC. Ensure that firewall does not block connections.
- Ensure TNS_ADMIN is set properly.
- Ensure that Oracle Service is started in the server PC.
- Verify Oracle System ID (SID) configurations and set them properly.
- Finally, the important check is to ensure that the listener is started on server PC. Check lsnrctl status to verify the same.