lundi 2 mars 2015

sqlplus on linux not connecting when provided with IP port


I am running Oracle Database 11g R2 on Oracle Linux 5.


I am able to connect to my SID from sqlplus if i use the command


sqlplus system/password@orcl


but when i provide the IP port


sqlplus system/password@//10.0.2.15:1521/orcl


i am unable to connect to my local database and i get the following error


ERROR:


ORA-12154: TNS:could not resolve the connect identifier specified


I am able to connect to my database remotely from sql developer so my JDBC driver is able to connect to the database from a remote machine.


My listner.ora looks like this ->


LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.15)(PORT = 1521)) ) ) )


10.0.2.15 is the IP because i am running the linux server on Virtualbox as NAT with port forwarding.


I am sure there is a simple fix but i am afraid i dont have too much knowledge about database.


Thanks, Ben.





Aucun commentaire:

Enregistrer un commentaire