Thursday, December 13, 2012

0 ORA-12560: TNS:protocol adapter error

This error “ORA-12560: TNS:protocol adapter error” usually means the TNS name look up error while client is trying to look up the tnsnames.ora.

In below screenshot, I use the IP address and port number to identify the Oracle host. I didn’t use the tnsnames.ora for the server identifier.

image

If I try to use “connect USERNAME/PASSWORD” to switch user. I will get the ORA-12560 error.

image

This is because, even I already connect to the database but just want to switch the user, the sqlplus would use the tnsnames.ora to make the new connection by default. Therefore, if there is no tnsnames.ora, we still have to use hostname and port number.

image

This also means the sqlplus connect command allow us not just change the user context but also the database server as well. Below screenshot, we switch from PODB to Orcl database.

image

Below screenshot shows the connect command works with tnsnames.ora

image

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates