Oracle connection error - oracle

java.sql.SQLException: Io exception: The Network Adapter could not establish the
connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java)
I am getting this error when data in database is increased (nearly 3000). It works fine with limited data (say 100).

The Network Adapter could not establish the connection
Is typically thrown when
the Oracle listener is not running
the wrong hostname was specified in the connection url
the wrong port was specified in the connection url
the port is blocked by firewall
I have never seen it related to "increasing" the data in the database

Related

How to fix IO Error: The Network Adapter could not establish the connection

I am trying to connect my oracle cloud database using sqldeveloper with connection type basic but it fails connection with error:
Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection.
Anyone can help how can i connect my oracle db system using sqldevloper with connection type either basic or TNS ??
Have you tried to telnet the server on port 1521?
It sounds likely that the dbsystem is not connected to the internet.
Please check if the dbsystem subnet has:
Security List with a rule to allow port 1521 on your ip address
Routing Table that allows internet access via internet gateway

DB Link throws ORA-28511: lost RPC connection to heterogeneous remote agent using SID

I use a DBLINK/Oracle Gateway to connect to an external non-oracle database. i have a timeout setting of 5 minutes.
when I connect using dblink, for the first time, it runs fine. After the idle time of 5 minutes, when I run the same sql again, it throws me the bellow error -
ORA-28511: lost RPC connection to heterogeneous remote agent using SID. ****
ORA-28509: unable to establish a connection to non-Oracle system
ORA-02063: preceding line from DB2T
Then when i run the sql again, its connecting fine. i guess its establishing a new connection.
Why am i getting the connection error and why oracle is not simply establishing a new connection when the previous connection is timed out?
Is there a way to not get the error and connect seamlessly or to suppress the error?
Easily replicable in sql developer by running a sql and waiting for 5 minutes.
Thanks in Advance.

coldfusion v 10 std unable to connect to oracle via jdbc oci driver

I am trying to establish a jdbc-oci connection to an oracle database on a coldfusion v 10 std server.
The reason for employing jdbc oci is the necessity to encrypt data flowing between the app server and the database (by using common settings in sqlnet.ora). However, no matter what syntax we try, neither a service
based nor a tnsnames based jdbc url will work. Immediately after saving (and automatically testing) the connection, coldfusion errors out with "java.sql.SQLException: Timed out trying to establish connection".
It looks weird that a timeout may have happened since the error will always be thrown immediately. Therefor I suppose there is another root cause for failing to establish the connection.
Any ideas out there?
Please note that we simulated connection establishment with a console application aside coldfusion but using the same jvm and jdbc driver successfully. it does therefore not seem to be a jvm or driver or oci.dll
related issue.
data source settings :
Driver Class : oracle.jdbc.driver.OracleDriver
JDBC URL (using tnsnames.ora) : jdbc:oracle:oci:#<theName>
JDBC URL (using ip, port, service) : jdbc:oracle:oci:#//<IP>:1521/<SID>
error message :
Connection verification failed for data source: theName
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish connection
environment :
ojdbc6 driver lives in a directory known to coldfusion
oci.dll lives in a directory known to the system path variable, verified by sysinternals processexplorer on the coldfusion service
for the JDBC URL (using tnsnames.ora), the directory containing tnsnames.ora is known as a system variable TNS_ADMIN, verified by sysinternals processexplorer on the coldfusion service
along with tnsnames.ora there is a sqlnet.ora file comprising settings to switch on data encryption
Stacktrace:
A non-SQL error occurred while requesting a connection from "datasource-name here".
Timed out trying to establish connection
Exception in thread "Thread-2120" java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3560)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3556)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:269)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:165)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
at java.lang.Thread.run(Thread.java:722)
A non-SQL error occurred while requesting a connection from "datasource-name here".
Timed out trying to establish connection
[Fatal Error] :2662:4: The element type "view" must be terminated by the matching end-tag "</view>".
Adding of the Path to the oracle instant client at the configuration file cf-directory\cfusion\bin\jvm.config has solved the problem.

use jdbc to connect sybase ASE

I want to use jdbc to connect Sybase ASE, but, I got an error in the following:
JZ006: 捕获到 IO 例外:java.net.ConnectException: Connection refused: connect
Can anybody tell me how to solve this problem?
"Connection refused: connect" is a low level socket error meaning that nothing is listening on the port you are trying to connect to (or it was blocked by a firewall).
This means that either you have no Sybase ASE running, it is not listening on the IP address you are connecting to, it is listening on a different port, or a firewall blocks your connection.

Connection to remote host MongoDB breaks after a certain number of inserts to the collection

I have my Mongo DB v2.1.2 hosted on remote server. After inserting 58070 records i am getting the following message exception more often
Message = "A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)"
I have not run out of memory in the DB folder on the remote server. Is there any restriction on the number of inserts at one go. Also i have provision for all sorts of Mongo Exceptions so it is not a mongo exception just a remote connection drop. When i re run, the connection drops on the same record. When i put this on my local mongo instance it goes through without a problem.
What could be the possible reasons?

Resources