10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello~
I have a requirement to write a shell script which will connect to the oracle database and run a select count(*) query on a table.
The script should succeed only when the count returns a number greater than zero. If the count returns zero, the script should fail.
Can someone please... (3 Replies)
Discussion started by: Naren.N
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have one SQL file prepared in UNIX and one script that is executing that.
In SQL i have Update and create queries.
I want to introduce conditions in SQL file (in UNIX) that if either of the create or update query failes whole transaction should be rollback.
I just have 1 create... (2 Replies)
Discussion started by: abhii
2 Replies
3. Shell Programming and Scripting
Hi All,
I tried executing set of queries from shell script but not able to capture the input query in the log file. The code looks something similar to below
sqlplus user/pwd@dbname << EOF > output.log
$(<inputfile.txt)
EOF
The above code is capturing the output of queries into... (9 Replies)
Discussion started by: loggedin.ksh
9 Replies
4. Shell Programming and Scripting
Hi Experts,
I want to call script_name.ksh as many time as id in customer table and also pass it as a parameter to script.
someting Like below.
for i in select id from customer
do
./script_name.ksh $i &
done
I have figured out how to have ID from customer but now how to call... (3 Replies)
Discussion started by: Opamps123
3 Replies
5. UNIX for Dummies Questions & Answers
I want to perform few post-session success tasks like update a status to 'true' in one of the sql database table, update date values to current system date in one of the configuration table in sql. How do i achieve this in a post session command?syntax with example will be helpful. (3 Replies)
Discussion started by: nathanvaithi
3 Replies
6. Shell Programming and Scripting
Hi,
Please help me out.
I have around 700 sql files to execute in a defined order, how can i do it from shell script (3 Replies)
Discussion started by: anushilrai
3 Replies
7. Shell Programming and Scripting
Hi ALL,
I need an help in connecting to oracle database, executing a select query and printing it on the screen. Can any one please write a simple code or psuedo code and let me know.
select query returns multiple values( say select name from emp)
Thanks in advance
LM (1 Reply)
Discussion started by: lijju.mathew
1 Replies
8. Shell Programming and Scripting
HI ALL
i have a requirement like this. i have to write a shell script to run a sql query. DB is oracle. once the query is run, the results of the query has to be published in a data file. can you please advice me how to go about it. i am absolutely new to shell scripts and this is a part of my job. (14 Replies)
Discussion started by: ragha81
14 Replies
9. UNIX for Dummies Questions & Answers
Hi there folks,
I am trying to execute remote sql queries on an Oracle server.
I would like to save the result of the executed sql queries on a text file, and send that text file as an attachment to an email address.
Could anyone give me an idea on how the above could be achieved? Any help... (2 Replies)
Discussion started by: Javed
2 Replies
10. UNIX for Dummies Questions & Answers
I cannot figure out how to run a SQL script, or just a sqlplus query, from a shell script (bash or ksh). Basically, I need to su - oracle from root and run a query, then test the exit status. (3 Replies)
Discussion started by: 98_1LE
3 Replies