Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Application fails to connect when Scheduled

Status
Not open for further replies.

tful282

Programmer
Jun 26, 2001
42
US
Hi.
This is a similar problem to unresolved post thread329-978428
I have written a VB application that queries an Oracle database, writes 2 reports and a text file. This app is intended to be installed on a server and run once a week.
When I run the application on the server manually it runs fine, writes across the network, etc. However, when I schedule this using windows Task Scheduler, it fails to open the database connections.
The 2 reports are using Oracle 92 driver odbc connections, while a separate query uses ADO... 'Provider=MSDAORA.1;Data Source=.... etc'. Looking in the Oracle sqlnet.log, there is a Fatal Connect error #12560- also the parameters to the Oracle client in this file appear incorrect:
Code:
*************************************************
Fatal NI connect error 12560, connecting to:
 (DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)
(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=C:\Program Files\DTVtoAP\DTVtoAP.exe)(HOST=DEVSADD01)(USER=VHA_AGENT))))

  VERSION INFORMATION:
	TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
	Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 9.2.0.1.0 - Production
  Time: 10-JAN-2006 10:02:17
  Tracing not turned on.
  Tns error struct:
    nr err code: 0
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 126
    nt OS err code: 0


*************************************************
. The connection criteria is stored in a config file, but I get the same issue if I hardcode the connection.

I have checked the most obvious things like incorrect passwords, network permissions.
Any suggestions?
 
I resolved this issue. I updated the Oracle client's tnsnames.ora and it magically worked.

Still do not understand why the application works when run manually.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top