Sponsored Content
Top Forums Shell Programming and Scripting Parallel SQL sessions in shell script Post 302724303 by only4satish on Wednesday 31st of October 2012 01:10:47 PM
Old 10-31-2012
thanks, if i want to know the execution time of sql1 and sql2 and it should display at terminal.

Code:
sqlplus username1/password1@DB1   @sql >> log1 &
sqlplus username2/password2@DB2  @sql2 >> log1 &
while ($? -eq 0)
do
let time=0
echo " sql still running  from $time min........"
sleep 60
let time=$time+1
done
wait
sqlplus username1/password1@DB3   @sql3 >> log3 &

please do the corrections
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problems executing SQL Plus sessions

If I execute this script: $ORACLE_HOME/bin/sqlplus -s <<EOF > oracle.log $DB_id/$DB_pswd@$DB_server start test.sql EOF the sql script executes with no errors. IF I execute the following script:... (12 Replies)
Discussion started by: mh53j_fe
12 Replies

2. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

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

3. Shell Programming and Scripting

Running shell script in parallel

Hi, I am a shell script which takes input parameters and performs various functions. My concern is, if we call the same shell script with different parameter values from different sessions, will the results be inconsistent? Are there any precautions I need to take inorder to avoid conflicts... (1 Reply)
Discussion started by: jamjam10k
1 Replies

4. Shell Programming and Scripting

Help with executing parallel sessions for same shell script with different but fixed parameters

Hi Experts, There is a shell script that accepts positional parameter between 1-25 to execute case statement of script depending upon the parameter passed. Now I need to run all the 25 sessions parallely. In each option of case statement it is connecting with sqlplus and executing a select... (11 Replies)
Discussion started by: Opamps123
11 Replies

5. UNIX for Advanced & Expert Users

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... (3 Replies)
Discussion started by: huasheng8
3 Replies

6. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

7. Shell Programming and Scripting

Parallel processing of SQL through Shell

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

8. Shell Programming and Scripting

Running 3 shell script parallel in another shell script

Hi, I'm trying to do teh below thing. I have a single script which uses 3 different parameters to do 3 different work like belwo. test1.sh par1 -- it shuts down an instance test1.sh par2 -- it shuts down an instance test1.sh par3 -- it shuts down an instance Now I created a script... (7 Replies)
Discussion started by: bhaski2012
7 Replies

9. Shell Programming and Scripting

Parallel for in a Script Shell

Hello, This is my Script which configure a list of nodes. ( 40 nodes, and the configuration 10 minutes) #! /bin/sh if then echo "USE: ./start.sh nodes else nb_lignes=`wc -l $1 | cut -d " " -f1` echo "$nb_lignes machines" for i in $(seq $nb_lignes) //instructions done fi My... (2 Replies)
Discussion started by: chercheur111
2 Replies

10. UNIX for Beginners Questions & Answers

Executing SQL's in parallel

Hi Folks, I have requirement to pull a bunch of SQL's from a table in DB and execute them in parallel and update the status of each query as and when they complete. Can you please help me with ideas on how this can be achieved? create table list_of_sql ( id number, full_sql... (3 Replies)
Discussion started by: member2014
3 Replies
dspam_maintenance(1)						   User Commands					      dspam_maintenance(1)

NAME
dspam_maintenance - remove old signatures and unimportant tokens from the DSPAM storage backend SYNOPSIS
dspam_maintenance [--profile=PROFILE] [--logdays=no_of_days] [--signatures=no_of_days] [--neutral=no_of_days] [--unused=no_of_days] [--hapaxes=no_of_days] [--hits1s=no_of_days] [--hits1i=no_of_days] [--without-sql-purge] [--with-sql-automatization] [--with-sql-autoup- date] [--purgescriptdir=directory] [--with-all-drivers] [--verbose] DESCRIPTION
dspam_maintenance is used to remove old signatures/tokens and unimportant tokens from the DSPAM storage backend and purge old log entries in user and system logs. This script can be called from the command line or run from within cron. Either add a line in your crontab or add this script in your cron.{hourly,daily,weekly,monthly}. Running this script every hour might not be the best idea but it's your decision if you want to do so. OPTIONS
--profile=PROFILE Specify a storage profile from dspam.conf. The storage profile selected will be used for all database connectivity. NOTE: See dspam.conf for more information. --logdays=no_of_days All log entries older than no_of_days days will be removed. NOTE: Default is 31 days. (for more info: man dspam_logrotate) --signatures=no_of_days All signatures older than no_of_daysdays will be removed. NOTE: Default value is set by the PurgeSignatures option in dspam.conf, if this option is not set, the default value is 14 days. This option is only used for the Hash driver. --neutral=no_of_days Deletes all tokens from the target users database whose probability is between 0.35 and 0.65 (fairly neutral, useless data). NOTE: Default value is set by the PurgeNeutral option in dspam.conf, if this option is not set, the default value is 90 days. --unused=no_of_days Remove stale tokens which have not been used for a long period of time. NOTE: Default value is set by the PurgeUnused option in dspam.conf, if this option is not set, the default value is 90 days. --hapaxes=no_of_days Remove tokens with a total hit count below 5 (which will be assigned a hapaxial value by DSPAM). NOTE: Default value is set by the PurgeHapaxes option in dspam.conf, if this option is not set, the default value is 30 days. --hits1s=no_of_days Remove tokens with a single SPAM hit. NOTE: Default value is set by the PurgeHits1S option in dspam.conf, if this option is not set, the default value is 15 days. --hits1i=no_of_days Remove tokens with a single INNOCENT hit. NOTE: Default value is set by the PurgeHits1I option in dspam.conf, if this option is not set, the default value is 15 days. --without-sql-purge Do not use SQL based purging. Only run dspam_clean. NOTE: Default is off (aka: use SQL based purging). --with-sql-optimization Run VACUUM (for PostgreSQL/SQLite) and/or OPTIMIZE (for MySQL). NOTE: Default is off (aka: do not use optimizations). --with-sql-autoupdate Run SQL based purging with purge day values passed to dspam_maintenance. NOTE: Default is off (aka: do not attempt to modify SQL instructions). --purgescriptdir=directory Space separated list of directories where to search for SQL files used for the SQL based purging. --with-all-drivers Process all installed storage drivers (not just the active driver). NOTE: Default is true (aka: process all installed drivers). --verbose Verbose output while running maintenance script. EXIT VALUE
0 Operation was successful. other Operation resulted in an error. Run the script with --verbose to get more information about error. COPYRIGHT
Copyright (C) 2002-2010 DSPAM Project All rights reserved. For more information, see http://dspam.sourceforge.net. SEE ALSO
dspam(1), dspam_admin(1), dspam_clean(1), dspam_crc(1), dspam_dump(1), dspam_logrotate(1), dspam_merge(1), dspam_stats(1), dspam_train(1) dspam_maintenance Apr 26, 2010 dspam_maintenance(1)
All times are GMT -4. The time now is 01:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy