10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
when I execute from psql prompt, I get the result, when I try to automate
using a shell script, the query is not working
# `/usr/bin/psql -U postgres -d coba1 -c "select name from users where
"Date" > current_date - 30;"`
ERROR: column "Date" does not exist
LINE 1: select... (2 Replies)
Discussion started by: srilinux09
2 Replies
2. Shell Programming and Scripting
Hello,
I have a main.sql file which runs around 5-6 .sql files and each .sql file is spooling it in separate text file.
In my shell script I am appending main.sql to one of my log file but I am not able to get detailed error if anything fails from those 5-6 .sql files. Those errors are... (1 Reply)
Discussion started by: sp92
1 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have a script which send sql query to oracle db and return value to my script.
dummy code like below:
sqlplus -s user/${PASSWD}@${ORACLE_SID} @${DIR}/query.sql > outputfile
using above code, when query has error, it send error to same out put file and exit code is 0, is... (6 Replies)
Discussion started by: ken6503
6 Replies
4. Shell Programming and Scripting
Hi,
I have a script ABC which calls another script XYZ. Function of XYZ is to ftp a file from one server to another.
code for ABC:
#!/bin/ksh
PATH=/usr/bin
home/user/xyz "$@"
exit $?
~
code for xyz:
#!/bin/ksh
HOSTNAME=$1
SRCNAME=$2
DSTNAME=$3 (4 Replies)
Discussion started by: Salil Gupta
4 Replies
5. UNIX for Advanced & Expert Users
Dear all,
How to make sqlplus command to exit with an apt error code in bash script,
It always returns 0 for me.
Thanks (9 Replies)
Discussion started by: vetrivendhan
9 Replies
6. Shell Programming and Scripting
I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts.
Here is my script
#!/bin/csh -f
source .orapass
set user = $USER
set pass = $PASS
cd /opt/data/scripts
echo... (2 Replies)
Discussion started by: allinshell99
2 Replies
7. Shell Programming and Scripting
I have sourced a property file in my script like this to load some variables in the script
Then i am able to echo all the property file values inside script but the script is not able to recognize other unix commands
#!/bin/bash
. build.properties
mkdir build
i am getting error ... (3 Replies)
Discussion started by: codeman007
3 Replies
8. Shell Programming and Scripting
Hi I am getting this error while connecting to sql through a shell script, whereas i am able to connect to sql directly.
It was working properly earlier, no clue why i am getting this.
Please find the log below:
FTP to <IP> completed Wed Apr 30 11:42:01 BST 2008
Program ended. Wed Apr 30... (1 Reply)
Discussion started by: nehak
1 Replies
9. UNIX for Dummies Questions & Answers
Hello ,
i have a problem in writing the shell script..
i have a script already written n just need to make a change in which when the script is not able to connect to the database ..it should print an error msg on the screen.
I have already seen previous posts on how to connect to the... (3 Replies)
Discussion started by: sommer_queen
3 Replies
10. Shell Programming and Scripting
hi ,
I tried running a PL/SQL script through unix shell script.
But am getting the following error.
"Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus "
Kindly suggest.
Regards,
Samit (5 Replies)
Discussion started by: dharmesht
5 Replies