Question: I'm trying to connect to multiple Oracle 10g databases
(failover) over the JDBC thin client, and when I run the following, I get:
java.sql.SQLException: Io exception: NL Exception was generated
connection
= DriverManager.getConnection("jdbc:oracle:thin:@DESCRIPTION = (ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = dbdev) (PORT = 1521))) (CONNECT_DATA =
(INSTANCE_NAME = orcldev)))", "scott", "tiger");
I eventually want to put multiple addresses in that string.
Right now I'm trying to get it to work with one! I've tried multiple
variations of this and
using the internal IP address for the HOST dbdev (see below). Here's the
tnsnames.ora file used by SQL*Plus on the same client machine that the NL
Exception Error in RZC is occurring:
ORCLDEV.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
(CONNECT_DATA =
(SID = orcldev)
)
)
Answer: Try This to solve your oracle NL Exception
error on 10g RAC:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)))(HOST=host
)(PORT=port)
(CONNECT_DATA=(SERVICE_NAME=sid)(SERVER=DEDICATED))
Adding SERVER=DEDICATED should clear up this NL Exception
error (see below)
MOSC Note:139775.1 has information available on the oracle NL Exception
error:
"To verify whether you are hitting this problem, verify whether the
Oracle instance is configured for Multithreaded Server (MTS).
If the Oracle instance is not configured for MTS, you are probably
encountering a different problem. Otherwise, continue."
MOSC goes on about the NL Exception error:
"To understand why this problem occurs, one must first understand
the differences in how the listener handles connections to shared
servers versus dedicated servers."
MOSC also goes on to describe the solutions to an NL
Exception error:
"Obviously, one solution is to use dedicated servers. However, this
may not always be feasible.
The key is to make sure the hostname on both the client and server
agree."