02-09-2011
Call parallel sql scripts from shell and return status when both sql are done
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing time or error log, etc.
Can someone please give an example on this? To make the sqls run in parallel, do I need 1 running in the background? And how do I do that when calling sqlplus?
Your suggestions are very appreciated! Thank you!
HS
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I like to call a shell script from pl/sql proceduere and i have to use the shell script return value in that procedure. i am using oracle 9i and cygwin.
can any one suggest me how can i do this (0 Replies)
Discussion started by: rajesh.P
0 Replies
2. Shell Programming and Scripting
I would like to call the shell script from pl/sql and i need to uses the value returned by the shell script in pl/sql procedure.
can any one suggest me how can i do that? (3 Replies)
Discussion started by: rajesh.P
3 Replies
3. Shell Programming and Scripting
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies
4. Shell Programming and Scripting
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies
5. UNIX for Advanced & Expert Users
Hi i am not able to connect sqlplus
my script is as follows
$ORACLE_HOME/bin/sqlplus << ! > /tmp/extract/DM.txt
and output is
SQL*Plus: Release 11.1.0.7.0 - Production on Wed Jan 18 02:53:54 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Enter user-name: t175481... (1 Reply)
Discussion started by: tushar_spatil
1 Replies
6. Shell Programming and Scripting
i have 3 sqls , sql 1 and sql 2 shuld run in parallel , but sql 3 should run after completion f sql1 nd sql2, my code is as below, please suggest the changes
sqlplus username1/password1@DB1 @sql >> log1 &
sqlplus username2/password2@DB2 @sql2 >> log1 &
how can i execute the... (7 Replies)
Discussion started by: only4satish
7 Replies
7. Shell Programming and Scripting
Hi All,
I need to return value to the main shell script, depending on whether the UPDATE command in the embedded pl/sql is successfu or not.
#!bin/ksh
updateStatus=`sqlplus --conn details-- << EOF
DECLARE
var_rows NUMBER;
BEGIN
update table_name
set column_name =... (7 Replies)
Discussion started by: rituparna_gupta
7 Replies
8. Shell Programming and Scripting
Hi Friends,
I am trying to write a shell which will invoke 3 CTAS (ORACLE create table XXX as select * from YYYY). The approximate time for one CTAS is around 25 mins. So i want to run the CTAS script parallely.
My pseudocode is as below.
Main script
nohup sh CTAS1.sh &... (3 Replies)
Discussion started by: Showdown
3 Replies
9. Shell Programming and Scripting
HI Experts,
I am pretty new to scripting and i need to create a perl or shell script which should fetch a file from local directory and insert the data into a table using sql loader. This will be later added to chron job to run daily and fetch all files and load them into
the table.
Also i... (1 Reply)
Discussion started by: sam1234
1 Replies
10. Shell Programming and Scripting
hi ,
the below script contains sql query and after executed it sends the output of the query (output.txt) to an email body with conditional subject line based on the output of all_counts_match.txt.
i want to make this script generic so that it can accept the sql file as parameter and can... (5 Replies)
Discussion started by: itzkashi
5 Replies
LEARN ABOUT DEBIAN
rt-shredder-4
rt-shredder(8) Request Tracker Reference rt-shredder(8)
NAME
rt-shredder - Script which wipes out tickets from RT DB
SYNOPSIS
rt-shredder --plugin list
rt-shredder --plugin help-Tickets
rt-shredder --plugin 'Tickets=query,Queue="general" and Status="deleted"'
rt-shredder --sqldump unshred.sql --plugin ...
rt-shredder --force --plugin ...
DESCRIPTION
rt-shredder - is script that allow you to wipe out objects from RT DB. This script uses API that RT::Shredder module adds to RT. Script
can be used as example of usage of the shredder API.
USAGE
You can use several options to control which objects script should wipeout.
OPTIONS
--sqldump <filename>
Outputs INSERT queries into file. This dump can be used to restore data after wiping out.
By default creates files <RT_home>/var/data/RT-Shredder/<ISO_date>-XXXX.sql
--object (DEPRECATED)
Option has been deprecated, use plugin "Objects" instead.
--plugin '<plugin name>[=<arg>,<val>[;<arg>,<val>]...]'
You can use plugins to select RT objects with various conditions. See also --plugin list and --plugin help options.
--plugin list
Output list of the available plugins.
--plugin help-<plugin name>
Outputs help for specified plugin.
--force
Script doesn't ask any questions.
SEE ALSO
RT::Shredder
perl v5.14.2 2013-05-22 rt-shredder(8)