10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
cat a1
scott
robert
tom
test
script :
#!/usr/bin/ksh
for NAME in `cat a1`
do
VALUE=`sqlplus -silent "nobody/bobody01@testq" <<END
set pagesize 0 feedback off verify off heading off echo off
select username from dba_users where username=upper('$NAME');
END`
if ; then
echo... (3 Replies)
Discussion started by: jhonnyrip
3 Replies
2. UNIX and Linux Applications
Good evening
I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus.
I tried to find out the user/passwd and service name by env variable and all Ive got is this:
ORACLE_SID_REPCOL=SCL_REPCOL
ORACLE_SID=xmeta
ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
3. Shell Programming and Scripting
Hi,
I am using the below code to get a numeric value from oracle to unix variable:
BD_RC_CNT=`sqlplus -s ${WMD_DM_CONNECT} <<EOF
set heading off
set pagesize 0
Select count(*)
from wmd_bad_data
where proc_id = ${PROC_ID}
and file_id = ${FILE_ID}
and file_dt =... (7 Replies)
Discussion started by: Arun Mishra
7 Replies
4. Programming
Hi,
I am trying to get the oracle variables and pass the values in sql placed in procedure.
VARIABLE
vstat='ASDS,FGDS,VCGD,VCXC'
Query :
select distinct dept from College
where section in ('C','D')
AND CODES =''
AND NAMES IN ('RAJ','SAM');
I want CODES values to be taken from vstat... (1 Reply)
Discussion started by: Perlbaby
1 Replies
5. Shell Programming and Scripting
Hi,
I have a function that is suposed to generate a AWR report:
#-----------------------#
gen_awr()
#-----------------------#
{
sqlplus -s admin/admin@OCEAN11<<ENDOFSQL
define num_days = ''
define report_type = "html"
define begin_snap =$snap1
define end_snap =%snap2
define... (1 Reply)
Discussion started by: amitlib
1 Replies
6. Shell Programming and Scripting
Please help me how to pass some unix vairable to oracle. I have used below , but not displaying passed (inval) value.
calling()
{
sqlplus -s $1/$2@$3 <<EOF
begin
exec call_sql($4);
end;
exit
EOF
}
calling user pwd inst value1... (17 Replies)
Discussion started by: Jairaj
17 Replies
7. Shell Programming and Scripting
using the script below I want to pass a parameters thorugh my sql
call(@/unixsxxx/xxxx/helpenv.sql emptab ) as input into an oracle procedure xxxx_package.proc1(%1,emptab); . I tried %1 but it does not work. Any suggestions.
#!bin/ksh
set -x
#
export... (0 Replies)
Discussion started by: TimHortons
0 Replies
8. Shell Programming and Scripting
Hi Team,
I need to get data from oracle table & need to assign that value to unix variable. I have serched the same in other threads. I found the following code.
I have tried code to get the value from oracle. but it is not working. The error shows invalid identifier "NAM" & then list all... (5 Replies)
Discussion started by: Amit.Sagpariya
5 Replies
9. UNIX for Dummies Questions & Answers
hi ,
how to pass unix variable to oracle
code is .............
#! /bin/ksh
echo enter date vale
read date1
sqlplus x/y@oracle
select * from emp where statrt_date= $date1
is this is correct way... (1 Reply)
Discussion started by: chiru
1 Replies
10. UNIX for Dummies Questions & Answers
Hi All, :confused:
I have the following code.
var=' '
sqlplus user/pass@DB <<EOF
whenever sqlerror exit 1
select package.func() into $var from dual;
EOF
echo $var
But, this code does not work to display the value returned by the oracle function. Do we have to bind variables before... (3 Replies)
Discussion started by: rahulrathod
3 Replies