Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Windows NT service problems using Oracle OCI 7.3

Windows NT service problems using Oracle OCI 7.3

From: Chris Hafey <chafey_at_ecst.csuchico.edu>
Date: 1996/12/27
Message-ID: <5a0ukq$o5f@charnel.ecst.csuchico.edu>#1/1

Hi
  I am writing a Windows NT service that uses Oracle 7.3 OCI libraries to talk to the database. The program works great when it runs in console mode, but I am having a few problems when I start it as a service via the Service Control Manager:

  1. The first time I try to log into the database (using orlon() ), I get an ORA-01019 error "unable to allocate memory in the user side". If the service Sleep()s a few seconds and then tries again it succeeds! This does not occur when I run it as a console application. (Yes, the database is already running)
  2. When the service encounters a major error, it will terminate itself. I cannot figure out how to make the SCM display the service's status as 'not started' without reopening the SCM. In other words, the SCM doesn't refresh the state of the service without closing it and reopening it. Telling the SCM that my status is SERVICE_STOP_PENDING or SERVICE_STOPPED via SetServiceStatus() doesn't work. I have even tried connecting to the SCM and telling it to shut the service down. Is this a bug in SCM or should I be doing something different?
  3. Is there anyway to specify permanent command line arguments for a service?
  4. Oracle put the default base address for their dll's at 0x40000 which conflicts with Microsoft VC++ default base address for the program. When I ran my program under the debugger, the loader had to fix up the dll location at run time because of a base conflict. DLL's should be loaded higher up in memory, why did Oracle do this? I had to map my programs base address down into 0x10000 to get it to work (it was crashing before getting to main() ).

   If someone could point me towards documentation which explains the proper way of building NT Oracle clients, I would be very grateful! It seems Oracle is doing something strange.

Thanks for any help!

Chris Hafey

PS - I am running Win NT 4.0 and compiling with VC++ 4.2.

-- 
chafey@ecst.csuchico.edu    	http://www.ecst.csuchico.edu/~chafey
Received on Fri Dec 27 1996 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US