12-19-2013
Run different SQL on multiple DBs using SHELL script
Hi Experts,
I have a list of Dbs.In that DBs i need to execute some sql scripts.
each sql script is unique and it should run on particular DB only.
For example. i have DBs like MDC20V,NDC20V,ODC20V and sql scripts like MD.sql,ND.sql,OD.sql.so MD.sql should run only in MDC20V and ND.sql should run only in NDC20V likewise i have 50+ Dbs.I need a single shell script to run this scripts.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How do I create a K Shell which would silently (without user input) logon to Oracle and
run an SQL script?
Any help will be greatly appreciated.
Steve (1 Reply)
Discussion started by: stevefox
1 Replies
2. Shell Programming and Scripting
hi Friends,
Please help me in writing shell script to run list of sql files.
database is Oracle 9i,
unix os is solaris
Requirement is
1. sql file must take two inputs a)feed id and b)business date
2.shell script must out put .xls or .csvfile as out put without trimming any column name and... (1 Reply)
Discussion started by: balireddy_77
1 Replies
3. Shell Programming and Scripting
Hello,
I want to connect to ssh, run a query, and store that into a variable in the shell script. Also I need to pass the variable back to php to display the query results.
I have created a public/private key pair for ssh connection and that is working fine. Also I am able to run query in the... (8 Replies)
Discussion started by: shekhar2010us
8 Replies
4. Shell Programming and Scripting
I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this?
Is there a way to have a persistent connection to oracle database... (9 Replies)
Discussion started by: vel4ever
9 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
Hi,
I have a query regarding execution of a sql query having long listing of parameters ..I need to execute this query inside a shell script.
The scenario is like....
Suppose I have a file abc.txt that has the card numbers..it could be in thousands..
then I need to fire a query like
... (12 Replies)
Discussion started by: vsachan
12 Replies
7. Shell Programming and Scripting
How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX? :confused: (1 Reply)
Discussion started by: 24ajay
1 Replies
8. Shell Programming and Scripting
I am trying to accomplish following tasks in my KSH script:
Run a sql script on multiple $ORACLE_SID at once
Sends an alert only if the threshold > 2 for any of the $ORACLE_SID
Please advice as to how I can approach this!!
Thanks in advance! (1 Reply)
Discussion started by: jd_2000
1 Replies
9. Shell Programming and Scripting
I want to run sql query in shell script and output data save as delimited text (delimited text would be comma)
Code:
SPOOL_FILE=/pgedw/dan.txt
SQL=/pgedw/dan.sql
sqlplus -s username/password@myhost:port/servicename <<EOF
set head on
set COLSEP ,
set linesize 32767
SET TRIMSPOOL ON
SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies
10. UNIX for Beginners Questions & Answers
Hi ,
Can any please help the below requirement on all multiple servers and multiple dbs.
update configuration set value='yes' ;1)
the above statement apply on 31 Databases at a time on different Ip address
eg : 10.104.1.12 (unix ip address )
the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
LEARN ABOUT DEBIAN
sql::translator::parser::sqlite
SQL::Translator::Parser::SQLite(3pm) User Contributed Perl Documentation SQL::Translator::Parser::SQLite(3pm)
NAME
SQL::Translator::Parser::SQLite - parser for SQLite
SYNOPSIS
use SQL::Translator;
use SQL::Translator::Parser::SQLite;
my $translator = SQL::Translator->new;
$translator->parser("SQL::Translator::Parser::SQLite");
DESCRIPTION
This is a grammar for parsing CREATE statements for SQLite as described here:
http://www.sqlite.org/lang.html
CREATE INDEX
sql-statement ::=
CREATE [TEMP | TEMPORARY] [UNIQUE] INDEX index-name
ON [database-name .] table-name ( column-name [, column-name]* )
[ ON CONFLICT conflict-algorithm ]
column-name ::=
name [ ASC | DESC ]
CREATE TABLE
sql-command ::=
CREATE [TEMP | TEMPORARY] TABLE table-name (
column-def [, column-def]*
[, constraint]*
)
sql-command ::=
CREATE [TEMP | TEMPORARY] TABLE table-name AS select-statement
column-def ::=
name [type] [[CONSTRAINT name] column-constraint]*
type ::=
typename |
typename ( number ) |
typename ( number , number )
column-constraint ::=
NOT NULL [ conflict-clause ] |
PRIMARY KEY [sort-order] [ conflict-clause ] |
UNIQUE [ conflict-clause ] |
CHECK ( expr ) [ conflict-clause ] |
DEFAULT value
constraint ::=
PRIMARY KEY ( name [, name]* ) [ conflict-clause ]|
UNIQUE ( name [, name]* ) [ conflict-clause ] |
CHECK ( expr ) [ conflict-clause ]
conflict-clause ::=
ON CONFLICT conflict-algorithm
CREATE TRIGGER
sql-statement ::=
CREATE [TEMP | TEMPORARY] TRIGGER trigger-name [ BEFORE | AFTER ]
database-event ON [database-name .] table-name
trigger-action
sql-statement ::=
CREATE [TEMP | TEMPORARY] TRIGGER trigger-name INSTEAD OF
database-event ON [database-name .] view-name
trigger-action
database-event ::=
DELETE |
INSERT |
UPDATE |
UPDATE OF column-list
trigger-action ::=
[ FOR EACH ROW | FOR EACH STATEMENT ] [ WHEN expression ]
BEGIN
trigger-step ; [ trigger-step ; ]*
END
trigger-step ::=
update-statement | insert-statement |
delete-statement | select-statement
CREATE VIEW
sql-command ::=
CREATE [TEMP | TEMPORARY] VIEW view-name AS select-statement
ON CONFLICT clause
conflict-clause ::=
ON CONFLICT conflict-algorithm
conflict-algorithm ::=
ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
expression
expr ::=
expr binary-op expr |
expr like-op expr |
unary-op expr |
( expr ) |
column-name |
table-name . column-name |
database-name . table-name . column-name |
literal-value |
function-name ( expr-list | * ) |
expr (+) |
expr ISNULL |
expr NOTNULL |
expr [NOT] BETWEEN expr AND expr |
expr [NOT] IN ( value-list ) |
expr [NOT] IN ( select-statement ) |
( select-statement ) |
CASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END
like-op::=
LIKE | GLOB | NOT LIKE | NOT GLOB
AUTHOR
Ken Youens-Clark <kclark@cpan.org>.
SEE ALSO
perl(1), Parse::RecDescent, SQL::Translator::Schema.
perl v5.14.2 2012-01-18 SQL::Translator::Parser::SQLite(3pm)