How can I connect to an Oracle database through a shell script?
13,804
You're entering the wrong TNS Name while connecting. Check the TNSNames defined in $oracle_home\network\admin\tnsnames.ora
and use the defined TNS Name as
sqlplus -s LOGIN/PASSSWD@tnsname
Related videos on Youtube
Comments
-
newbie dev almost 2 years
I have tried to connect to an Oracle database using the below command:
sqlplus -s LOGIN/PASSSWD@SERVERNAME:ORA_PORT/SERVICE_NAME
However I couldn't connect. It was throwing the following error:
ORA-12541: TNS: no listener.
How can I fix this?
-
100rabh over 12 yearscheck if your listener is up and running
-
newbie dev over 12 yearsYes its up only..i can able to connect through sqlplus but couldn't able to do it through shell script..
-
newbie dev over 12 yearsconn username/password is command i used to connect through SQLPlus..Also system throws ORA-12162 TNS:net service name is incorrectly specified error after ORA-12541: TNS: no listener..
-