10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am using below code :
for i in `ps -ef|grep pmon|awk {' print $8 '}|cut -f3 -d'_'|grep -v '^grep'`
do
ORACLE_SID=$i
export ORACLE_SID;
dest=`sqlplus "/ as sysdba" <<EOF
set heading off feedback on verify off
select DESTINATION from v\\$archive_dest where target in... (5 Replies)
Discussion started by: admin_db
5 Replies
2. Shell Programming and Scripting
Hi,
I would like to have the output from an Oracle procedure be captured into a bash variable, then emailed to me when it runs on the cron daily as such:
~~~~~bash script~~~~~~~~~~~
#!/bin/bash
shellvar=`sqlplus -s <<EOF
execute test();
commit;
exit;
EOF`
echo $shellvar
mail -s "email... (1 Reply)
Discussion started by: inlinesidekick
1 Replies
3. Shell Programming and Scripting
I am trying to import a sqlplus output into a shell variable but it doesnt seem to be working.
set -x
export DEPENDENT_CR_NO=`sqlplus -s /nolog <<EOF
conn username/passwd
set heading off
select dependency from custom_patches where patch_name='PATCH.zip';
exit;
EOF`
echo $DEPENDENT_CR_NO
... (2 Replies)
Discussion started by: beginer314
2 Replies
4. Solaris
Hi All, I have the below simple script.
It runs just fine by itself when I manually invoke it.
But once I put it in the crontab with entry:
* * * * * /users/myuser/test.ksh >> /users/myuser/log/test.txt"
It does NOT print the returned value ($REMAIN) from the DB!?
The result in the... (3 Replies)
Discussion started by: steve701
3 Replies
5. Shell Programming and Scripting
UNIX Gods,
I'll be running this script from CRON. I need to log the status of each of the six sqlplus calls into a file when this job is kicked off. Any suggestions?
Thanks in advance.
#!/bin/ksh
export USAGE="USAGE: `basename $0` -e <DBUSER> <DBPASSWD> <TNSNAME>"
if ; then
... (2 Replies)
Discussion started by: WhoDatWhoDer
2 Replies
6. Shell Programming and Scripting
hi
how can i store sqlplus output to a variable in sh script (not bash)
Thanks
MM (1 Reply)
Discussion started by: murtymvvs
1 Replies
7. Shell Programming and Scripting
a job extracts orcle data into unix as flat file.
a single record breaks into two record in unix flat file. This is the case only for 6 records out of 60 lack records.
(its not single record in two line. but its single record into record. ie., \n come into picture)
can you tell me what... (6 Replies)
Discussion started by: Gopal_Engg
6 Replies
8. UNIX for Dummies Questions & Answers
I need to get the output parameter from a stored procedure in sql plus using shell script. Can anyone help me please ... (1 Reply)
Discussion started by: risshanth
1 Replies
9. UNIX for Advanced & Expert Users
Hi,
I have a script which calls a sqlplus command and i'm saving the output in a variable.
Z=`sqlplus -s $TC_ORACLE_USER/$TC_ORACLE_PASSWORD@$TC_CONNECT_STRING <<eof
set echo off
set head off
set serveroutput on;
set feedback off;
select description from period
where trunc(sysdate)... (2 Replies)
Discussion started by: decci_7
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am using a query like below in my shell script :
{
{
echo "set echo off"
echo "set head off"
echo "whenever sqlerror exit -1;
select NUMBER ||','||
FNAME ||','||
LOC ||','||
... (2 Replies)
Discussion started by: deepakgang
2 Replies