Thursday, 30 November 2017

Connect SQL* Plus using the TNS entry

This post is about connecting SQL Plus using the TNS entry details from the command prompt.

This are the command to use.


1. Using SID :

sqlplus <username>/<password>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SID=<sid>)))


2. Using Service Name :

sqlplus <username>/<password>@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<hostname>)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=<service_name>)))


No comments:

Post a Comment