Database Reference
In-Depth Information
client$ cat tnsnames.ora
TEN_TCP.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST=dbserver.oradbpro.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = TEN)
)
)
Let's start the TNS Listener and verify that the client can connect to it. For the sake of
conciseness,
lsnrctl
output, which does not indicate whether valid node checking is config-
ured, is omitted.
dbserver$ lsnrctl start
Since the preceding
sqlnet.ora
file does not contain any of the three valid node checking
parameters, the feature is disabled and any client can connect successfully.
client$ sqlplus -l ndebes/
secret@ten_tcp.world
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Rlease
10.2.0.1.0 - Production
Enabling and Modifying Valid Node Checking
at Runtime
I claimed that valid node checking could be enabled dynamically in Oracle10
g
and Oracle11
g
,
that is, without stopping and restarting the TNS Listener. Note that this works only if the
configuration file
sqlnet.ora
was present when the TNS Listener was started. Let's verify my
claim by changing
sqlnet.ora
as follows on the server and running
lsnrctl
reload
:
1
dbserver$ cat sqlnet.ora
NAMES.DIRECTORY_PATH=(TNSNAMES)
tcp.validnode_checking=yes
tcp.excluded_nodes=(client.oradbpro.com)
dbserver$ lsnrctl reload
The output of
lsnrctl
reload
does not indicate whether valid node checking is enabled or
not. Now, an attempt to connect from the client system
client.oradbpro.com
fails.
1.
It appears that the LSNRCTL utility caches the TNS Listener configuration. When testing, you should
always run
lsnrctl
from the command line, instead of leaving the utility open and running multiple
commands at the LSNRCTL prompt. The latter approach may not pick up changes to
listener.ora
.