(1). Use,
sqlplus user_name/password@//host/service_name
Eg: > sqlplus scott/tiger@//192.168.161.66/orcl
you may get "ORA-12154: TNS:could not resolve the connect identifier specified"
Check u have added/uncommented following line in sqlnet.ora which is at
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
(2). Use, Here it's not necessary to have above entry in sqlnet.ora file.
sqlplus scott/tigger@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.161.66)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(service_name=orcl)))'
Note: No line breaks, No spaces and No semicolon(;) at the end
Reference : Oracle Magazine July/August 2010