This discussion is archived
4 Replies Latest reply: Jul 18, 2012 2:44 PM by 948878 RSS

Application runs but not as a Windows service oracore

948878 Newbie
Currently Being Moderated
I have a weird problem and I was hoping somebody might be able to help me. I have an application that we developed that uses an Oracle database. The application can be run in user mode(double clicking on the file) or as a Windows service. We have always used the Oracle Database client to connect to the Database in user mode and it has worked. Using the same configuration we were able to run our application as a service and it has always worked. The problem now is that if we use a newer Oracle Client (>= 10.2) it will not work as a service. When I say it doesn't work I mean that the application never starts and the Windows Event Viewer log states an APPCRASH in oracore10.dll or oracore11.dll.

It doesn't seem to matter which database we use, 10G, 11G, because if we use the 10.1 version of the Oracle Database Client to connect to these databases it works. However if we use any client>=10.2 the application crashes.

Any suggestions?

Edited by: 945875 on Jul 11, 2012 1:45 PM
  • 1. Re: Application runs but not as a Windows service oracore
    Christian.Shay - Oracle Pro
    Currently Being Moderated
    Sounds like you have a DLL mismatch of some kind. Search for all copies of OCI.DLL on the machine and make sure you only see them where you expect Oracle homes to be. If someone hand copied Oracle DLLs rather than doing a proper install this could be the result.

    If you see them in non-Oracle home locations, redo the install of the client.
  • 2. Re: Application runs but not as a Windows service oracore
    948878 Newbie
    Currently Being Moderated
    I searched for that dll but it was only in 1 location, namely in the Oracle client folder. For what it's worth the Oracle client installation is in a VMware environment in a virgin Server 2008 R2 OS install.
  • 3. Re: Application runs but not as a Windows service oracore
    Christian.Shay - Oracle Pro
    Currently Being Moderated
    Can you try deleting all traces of the client and reinstall it using the ORacle Installer? Make sure OCI.DLL is deleted and not locked before you reinstall. You need to delete all files not just OCI.DLL. There was an issue where OCI.DLL was getting locked and then newer clients were using the old OCI.DLL.

    I assume the database is on a different machine? Please confirm.
  • 4. Re: Application runs but not as a Windows service oracore
    948878 Newbie
    Currently Being Moderated
    So I stopped any Oracle windows services that were running, deleted the only oracle directory on the machine, and reinstalled 11.2 client. The same results occur, I can connect to and start my application in user mode but not as a service. I checked the version# of OCI.dll, 1 instance of it on the machine, and it does state that it is version 11.2.0.1. The setup I have is:

    Machine 1: Server 2008 R2
    Oracle 11g database
    Oracle 11g client
    my application

    Machine 2: Windows 7 64-bit
    Oracle 11g client
    my application

    I get the exact same results if I try to run my application on the same machine as the database (machine 1) or across the network (machine 2).
    I've setup the connection using Oracle Client's Net Configuration Assistant, added the Local Net Service Name Configuration, and am using TCP. At the end of the Local Net Service Name Configuration I get "Success" when talking to the database.

    Thank you for any help you might be able to provide.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points