Sponsored Content
Top Forums Shell Programming and Scripting Executing Multiple Queries in parallel in Shell Post 302841875 by Niranjancse on Thursday 8th of August 2013 05:14:03 AM
Old 08-08-2013
Oracle Executing Multiple Queries in parallel in Shell

I have n number of SQL queries needs to executed in Shell. Result of this query need to assign in a variable. Once all the queries are executed script needs to exit.

Sample Query:

SQL 1: Select Count(*) from TABLE GROUP BY COL1,COL2

SQL 2: Select Count(*) from TABLE GROUP BY COL1,COL2

Result of the above queries need to assign in variables and shell needs to exit once execution of all queries completed.

Can any one post how it can be achieve in shell script?

Envionment: LINUX
Database : ORACLE 11.G
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sh Shell Script executing remote SQL queries

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

2. Shell Programming and Scripting

Multiple MySql queries in shell script?

Hi guys, i know how to run a single query using mysql embedded in a shell script as follows: `mysql -umyuser -pmypass --host myhost database<<SQL ${query}; quit SQL` However, how would i be able to run several queries within the same connection? The reason for this is i am creating... (3 Replies)
Discussion started by: muay_tb
3 Replies

3. Shell Programming and Scripting

Executing informix queries using isqlrf

Hi, I have my informix queries in files named sql1.sql and sql2.sql. I am executing these queries in a remote informix db server.The data got as a result of executing sql1.sql and sql2.sql is got in file1.dat and file2.dat respectively. cmd= ssh "$USER_NAME"@"$HOST_NAME" "export... (0 Replies)
Discussion started by: Shri123
0 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. Shell Programming and Scripting

Find and execute shell scripts in multiple sub directories in parallel

I have one parent directory and within that parent directory there are several other sub-directories and within those sub-directories there are several other "large number" of sub-directories. All the sub directories have a shell script in them with a common file name execute_command.sh I want... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

6. Shell Programming and Scripting

How to store results of multiple sql queries in shell variables in ksh?

Hi, I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else. Thanks in advance.. Cheers (6 Replies)
Discussion started by: gonchusirsa
6 Replies

7. Shell Programming and Scripting

Executing set of sql queries from shell script

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

8. Red Hat

Reading csv and executing queries

hi all, i have a csv file in which some queries are there and through a shell script i am reading and trying to excute them but it is not working properly my csv file is like this Tid,table,query,values 1,PRD_FRG_FILE_JRNL,SELECT SWI_ID,FT_SWI 2,PRD_FRG_FILE_JRNL,SELECT COUNT(1),1 ... (2 Replies)
Discussion started by: ramsavi
2 Replies

9. Linux

How to store count of multiple queries in variables in a shell script?

how to store the count of queries in variables inside a filein shell script my output : filename ------- variable1=result from 1st query variable2=result from 2nd query . . . . (3 Replies)
Discussion started by: sanvel
3 Replies

10. Shell Programming and Scripting

Issue on executing db2 queries through shell script

hi i am trying to execute db2 queries through shell script. it's working fine but for few queries is not working ( those queries are taking time so the script is not waiting to get the complete the execution of that query ) could you please any one help me on this is there any wait... (1 Reply)
Discussion started by: bhaskar v
1 Replies
Plucene::Search::Query(3pm)				User Contributed Perl Documentation			       Plucene::Search::Query(3pm)

NAME
Plucene::Search::Query - base class for queries SYNOPSIS
my $s_query = Plucene::Search::Query::Subclass->new({ boost => $boost_factor}); my $scorer = $s_query->scorer($query, $searcher, $reader); DESCRIPTION
This is an abstract base class for queries. A query is a specification of the content an properties of the desired documents. Every search is done by matching a query against the document index and locating the ones that match the query. The simplest query specifies a single term (or word) that is to be matched against a single field (e.g. 'author') of each of the documents in the index. This kind of query matches any document that contains the term in the specified field. A more complex queries may contain nested queries with 'and', 'or', 'not' or 'phrase' relations. Queries may also contains specification of which document fields to match against the various parts of the query (.e.g. 'authors' and 'title') and hints that may effects the ranking of the matched documents ('boost' factor). METHODS
new my $s_query = Plucene::Search::Query::Subclass->new({ boost => $boost_factor}); boost Get / set this attribute scorer my $scorer = $s_query->scorer (Plucene::Search::Query $query, $searcher, $reader); prepare Does nothing sum_squared_weights / normalize / _scorer These must be defined in a subclass perl v5.12.4 2011-08-14 Plucene::Search::Query(3pm)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy