Re: Accessing Oracle problem?

From: Lalith Subramanian <lalith_at_BARRA.COM>
Date: Fri, 3 Sep 1993 17:59:29 GMT
Message-ID: <CCsHz5.JqL_at_corwin.barra.com>


In article <1993Aug30.033634.22161_at_ntuix.ntu.ac.sg> cttan_at_ntuix.ntu.ac.sg (Chin Thong) writes: >
> Has anyone done this before ?

I don't know about others, but I have :-)

> I'm suppose to create a server process that accept queries from
> a bunch of PC on a LAN. The server program is written in Pro*C
> and run on the VAX/VMS with ORACLE v6.0.3. As this is suppose to
> be a server process, it should run in the background. The problem
> is that, when I run the server process in the background (via
> run /detached), it is not able to connect to the Oracle database.

Simple way to check if the "/detach" is the problem - try running the server without the "/detach" and see if it works. 99.999% chances are it will :-) This would mean that some of your logicals that are defined for your interactive process( via LOGIN.COM, SYS$SYLOGIN...) aren't defined for the server process. This of course happens because the detached process hasn't run this stuff.......*BECAUSE* that's how detached processes work :-)

The way to overcome this is to ensure that the required logicals ( most likely ORA_SID etc. ) *ARE* defined for the server proc. You can do this in two ways:

  1. Make sure that the logicals required by Oracle are defined at the system-level.
  2. This is the better way - Run SYS$SYSTEM:LOGINOUT.EXE as the image for the RUN command, and make a DCL Command procedure the input and have this define anything that you need for the server. The reason this is better is that this maps DCL to the detached proc. and you can do pretty much anything in the input .COM procedure then.

Hope this helps !

Lalith

P.S: Warning - Servers that serve database clients are typically resource

      hogs and you could run out of any number of quotas !  I hope you
      know about what default quotas  you get on detached processes( i.e.
      PQLs ), and have enough privileges to override them when you
      start the server.....otherwise you'll have lots and lots of fun
      to figure out why client PC's got kicked out due to a dead server :-)
-- 
----------------------------------------------------------------------
Lalith Subramanian              UUCP    :  ...!uupsi!barra!lalith
BARRA, Inc.                     Internet:  lalith_at_barra.com
Berkeley, CA                    Work    :  (510)-649-4242 
Received on Fri Sep 03 1993 - 19:59:29 CEST

Original text of this message