DSExecute with sqlplus giving ORA error
Posted: Thu Aug 02, 2007 7:08 pm
Hi guys,
We are in the process of migrating our DS jobs from our Dev and testing environments to our SVT/PROD environments. However, in doing so we seem to have uncovered a rather baffling problem when trying to execute sqlplus from DS basic using DSExecute.
Here is a cut down version of our ExecuteSQL DS Basic routine which is raising the error:
Now this routine has worked on about 4-5 different environments without problem, however our PROD/SVT environment returns the following errors from Oracle:
I've checked all the parameters for the routine and there is nothing wrong. I've gone through all the environment settings and the only notable difference I could see was that the "SHELL" variable is "/bin/ksh" in SVT rather than "bash" like in all the other environments. However, I've manually performed the same commands from the command line (both bash and ksh) and sqlplus logged in without a problem.
Can anyone give me any suggestions as to what could be causing this? We are quickly reaching the end of our SVT phase and things are starting to get desparate.
We are in the process of migrating our DS jobs from our Dev and testing environments to our SVT/PROD environments. However, in doing so we seem to have uncovered a rather baffling problem when trying to execute sqlplus from DS basic using DSExecute.
Here is a cut down version of our ExecuteSQL DS Basic routine which is raising the error:
Code: Select all
* ------------------------------------------------------------
* Set Routine Constants.
* ------------------------------------------------------------
Lf = Char(10)
CrLf = char(13):Char(10)
RoutineName = "ExecuteSQL"
* ------------------------------------------------------------
* Generate the SqlPlus commands.
* ------------------------------------------------------------
Command<1> = 'sqlplus -S ': Username :'/': Password :'@': Instance :' <<END'
Command<2> = Convert(@FM, Lf, SqlStatement)
Command<3> = 'EXIT 0;'
Command<4> = 'END'
Command = Ereplace(Command, @FM, CrLf)
* ------------------------------------------------------------
* Execute SqlPlus from the UNIX Shell.
* ------------------------------------------------------------
Call DSExecute("UNIX", Command, SqlResult, SystemReturnCode)
Code: Select all
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_string>] | /
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_string>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
I've checked all the parameters for the routine and there is nothing wrong. I've gone through all the environment settings and the only notable difference I could see was that the "SHELL" variable is "/bin/ksh" in SVT rather than "bash" like in all the other environments. However, I've manually performed the same commands from the command line (both bash and ksh) and sqlplus logged in without a problem.
Can anyone give me any suggestions as to what could be causing this? We are quickly reaching the end of our SVT phase and things are starting to get desparate.