You don’t need tns or ldap entry to connect to your db from your desktop. 10g uses service name and 11g uses sid.
C:\Documents and Settings>tnsping hostname:1141/emrep
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 – Production on 24-FEB-2
011 18:42:59
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
c:\tns\sqlnet.ora
Used EZCONNECT adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=emrep))(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxxxxx)(PORT=1141)))
OK (440 msec)
C:\Documents and Settings\>sqlplus dbsnmp/*******@hostname:1141/emrep
SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 24 18:44:30 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
SQL> select host_name from v$instance;
HOST_NAME
—————————————————————-
hostname
SQL> show parameter db_name
NAME TYPE
———————————— ——————————–
VALUE
——————————
db_name string
emrep
to work you need below entry in your sqlnet.ora,
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)