Unix Technical Forum

Scheduled batch process fail to connect to Oracle

This is a discussion on Scheduled batch process fail to connect to Oracle within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hello! We have a batch process developed in MKS korn shell, where we connect to Oracle using: .... SQL_CODE=`plus33 ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 05:26 AM
Vladimir Uzlaner
 
Posts: n/a
Default Scheduled batch process fail to connect to Oracle

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 05:26 AM
Volker Hetzer
 
Posts: n/a
Default Re: Scheduled batch process fail to connect to Oracle


"Vladimir Uzlaner" <uzlanerv@yahoo.com> schrieb im Newsbeitrag news:76fc9868.0412211229.5b2a4e7c@posting.google.c om...
> Hello!
> 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:

You sure the cron job isn't run as root?

Lots of Greetings!
Volker
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 05:27 AM
Frank van Bortel
 
Posts: n/a
Default Re: Scheduled batch process fail to connect to Oracle

Vladimir Uzlaner wrote:
> 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


Generally, a problem with missing environment variables.
Too long ago I worked with MKS (v1, I believe, over 15 years back?)
to give you a specific answer

--
Regards,
Frank van Bortel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com