10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
I am trying to run a sqlplus script against several databases via a FOR/LOOP and also passing the loop variable to a sqlplus script I am calling, as follows:
#!/bin/bash
export ORACLE_SID=plgc1
export ORACLE_HOME=/opt/oracle/product/11.2.0.2/db_1
export... (1 Reply)
Discussion started by: jonnyd
1 Replies
2. UNIX for Beginners Questions & Answers
hi guys
i have a sqlplus :
sqlplus -s username/password << EOF
@mysql.sql
EOF
in mysql.sql there is a count of a table, i want to write in a variabile unix.
how can i do?
Thanks a lot
Regards
Francesco. (3 Replies)
Discussion started by: Francesco_IT
3 Replies
3. 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
4. Shell Programming and Scripting
Hi Gurus,
I am stuck with the step where i need to fetch the location & sales from the below procedure by taking it from table field using the for loop. any idea how this can be done in unix. From one column both the location and sales are taken out.
create or replace procedure newyork... (2 Replies)
Discussion started by: arun888
2 Replies
5. Shell Programming and Scripting
Hi, I'm a it stuck on the below code where a variable is pulled from sqlplus and used in awk. It runs with no errors but still pulls back all records in the input file.
It should pull the max reference from sql plus and then only print those records where the reference value in column 1 is... (4 Replies)
Discussion started by: jonathanb30
4 Replies
6. 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
7. 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
8. Shell Programming and Scripting
Hi,
I am writing a script which creates an external table using a shell script. My requirement is like this.
Usage: . ./r.ksh <table_name> - this should create an external table.
e.g . ./r.ksh abc - this should create an external table as abc_external.
How do i achieve this? Please... (5 Replies)
Discussion started by: Anaramkris
5 Replies
9. UNIX for Advanced & Expert Users
hi fellows,
can any body tell me how to pass unix variables to oracle
code is...
#! /bin/ksh
echo ENTER DATE VALUE's
read START_DATE END_DATE
sqlplus xyx/abc@oracle
select * from table1 where coloumn1 between $START_DATE and $END_DATE;
is this is correct way...........
Thanks in... (1 Reply)
Discussion started by: chiru
1 Replies
10. Shell Programming and Scripting
Hi,
I am writing a ksh script which will use sqlplus to run a sql and pass 2 variables as the SQL request. In the ksh script, I have 2 variables which are $min_snap and $max_snap holding 2 different numbers.
Inside the same script, I am using SQLPLUS to run an Oracle SQL script,... (6 Replies)
Discussion started by: rwunwla
6 Replies