Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ADO connection to Oracle gets a listener error, but only on the first few attempts
I have a VB 6.0 program that runs on a Win2k machine and connects to
an Oracle 8i database on an AIX system. It works fine.
I split it up into two programs such that one invokes multiple instances of the other. The one that has multiple instances running accesses Oracle to do a query based on a command-line parameter passed by the controller program.
When I fire up the controller program, it immediately runs 8 instances of the database access program. The first two or three get an Oracle error and the rest work fine.
The controller program ensures that 8 instances of the database access program are always running -- when one instance completes and exists it spawns a new one, until it goes through the thousands required.
If I kill off the controller program, let all the access program instances complete, and then run the controller program again, I do not get the errors even though it is doing exactly the same thing as it did before.
The issue appears to be one of multiple programs attempting to make Oracle connections at the same time, but only when no connection has been made for some time.
The exact error I get is:
Run-time error '-2147467259 (80004005)': ORA-12541: TNS:no listener
I get the following in sqlnet.log:
VERSION INFORMATION:
TNS for 32-bit Windows: Version 8.1.7.0.0 - Production Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version8.1.7.0.0 - Production
VERSION INFORMATION:
TNS for 32-bit Windows: Version 8.1.7.0.0 - Production Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version8.1.7.0.0 - Production
My sqlnet.ora:
# SQLNET.ORA Network Configuration File:
C:\orant\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME) automatic_ipc=off
trace_level_client=16 trace_unique_client=true trace_directory_client = c:\
The code that makes the connection (in the interests of security, actual strings have been replaced with pound signs):
Dim cnnOracle As ADODB.Connection
Set cnnOracle = New ADODB.Connection
cnnOracle.Open "Provider=msdaora;Data Source=##;User
Id=##;Password=##;"
Received on Fri Jun 06 2003 - 10:40:40 CDT