-
Shell Script Needed
Hi,
Can any one give me a sample shell script which pass and receive values from the oracle database.
-
Can you tell us in more detail what values of database? something like SQL? like what exactly you want to do? Thanks.
-- Dilip
-
well pass values are asy
something like
#!/bin/ksh
X=$1
Y=$2
sqlplus -s << EOF >> /tmp/hi.log
user/password@tns
whenever sqlerror exit 1
@tst.sql $1 $2
exit 0
EOF
receive is harder, I only know how to receive one value back
Z=`sqlplus -s << EOF >> /tmp/hi.log
user/password@tns
whenever sqlerror exit 1
variable x number
begin
:x:=8;
end;
/
exit :x
EOF`
-
I just want to pass some values from the shell script to a procedure and to retrive some values from the procedure to the shell.
For example.
i want a table status from dba_objects.so i pass the table name from the shell script and i need the status from the database to the shell script.
I am very weak in shell scripting.Would you mind helping me.
Thanks
-
I just want to pass some values from the shell script to a procedure and to retrive some values from the procedure to the shell.
For example.
i want a table status from dba_objects.so i pass the table name from the shell script and i need the status from the database to the shell script.
I am very weak in shell scripting.Would you mind helping me.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|