Re: SQLPLUS within UNIX script problem

From: ck <cgk1_at_rocketmail.com>
Date: 5 Mar 2003 18:17:33 -0800
Message-ID: <be868a14.0303051817.173c2ba9_at_posting.google.com>


harry827_at_yahoo.com (hs) wrote in message news:<12c8e030.0303040552.45507e87_at_posting.google.com>...
> I have a command that looks like the following in a unix shell script
> log=`sqlplus -s $DW_USER_at_$ORACLE_SID @$SCRDIR/$4 << +
> $PSWD
> +`
>
> When I look a the output in $log I not only see the result set but
> also every file in that directory. Almost seems like echo * is
> happening somewhere along the line. Anyone know how I can get around
> this ?

I would check to see what the value of each varible is. Is $4 null? The other thing I would do is run the script with hard coded values to see if it works that way and then trouble shoot from there. I've not used + for a marker so you might try to change that and see what happens.

Does log have to be assigned the value of sqlplus? Can sqlplus run on it's own line and then redirect standard out to log or spool to log? Is it possible to set up an ops$ account to run the script? Then you would not need to pass in the password.

I hope this gives you something to look at.

>
> Thanks
> Harry
Received on Thu Mar 06 2003 - 03:17:33 CET

Original text of this message