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 -> Re: Scheduled batch process fail to connect to Oracle

Re: Scheduled batch process fail to connect to Oracle

From: ana <anacedent_at_hotmail.com>
Date: Tue, 21 Dec 2004 12:40:29 -0800
Message-ID: <32rg14F3odq2dU1@individual.net>


"Vladimir Uzlaner" <uzlanerv_at_yahoo.com> wrote in message news:76fc9868.0412211228.748c5fd_at_posting.google.com...
> Hello!
>
>
> We have a batch process developed in MKS korn shell, where we connect
> to Oracle using:
>
>
> ...
>
>
> SQL_CODE=`plus33 -s /@$ENVIRON<< SQLBLOCK
> ...
> /
> EXIT
> SQLBLOCK`
> ...
>
> In this case Oracle take the integral user login. And it is working
> properly if we run script from the shell environment, but it fail to
> connect to Oracle if we trying to run scheduled batch process.
>
>
> Suppose user login is user/password. Then MKS connect to Oracle using
> OPS$USER/password login. I think problem is in '$' sign, because for
> Korn shell it is special character. And if we put:
>
>
> ...
>
>
> SQL_CODE=`plus33 -s 'OPS$USER/password'@$ENVIRON<< SQLBLOCK
> ...
> /
> EXIT
> SQLBLOCK`
> ...
>
> It is working, but without quotes:
>
>
> SQL_CODE=`plus33 -s OPS$USER/password@$ENVIRON it is fail again.
> Please, advise anybody how to resolve this problem.
>
>
> TIA.
>
>
> Vladimir Uzlaner

Here are a couple of observations...

  1. If MKS is really similar to *nix, the batch environment is almost non-existant. Under any real *nix, the batch script needs to source in an appropriate environmental file . ./.bash_profile
  2. WRT the problem involving the dollar-sign character, again with most real *nix shells you solve it by "OPS\$username"; escaping the special "$" character with a back-slash character.

HTH & YMMV Received on Tue Dec 21 2004 - 14:40:29 CST

Original text of this message

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