Re: before I re-invent the wheel

From: rjamya <rjamya_at_gmail.com>
Date: Thu, 13 Jan 2011 21:59:12 -0500
Message-ID: <AANLkTinwyVPL5BEQfoXvtGKQSqkBnGnmu3FNaoW0LKn-_at_mail.gmail.com>



How about writing sql to generate a sql file that has
  1. connect stmt for givne schema/db
  2. spool and set commands
  3. actual sql stmt to be executed
  4. spool off

repeat until done and then execute that sql via sqlplus /nolog _at_yoursql ? This yoursql file can be generated easily by usign a bit of analytical function (to detect schema/db connectivity change). of course dbms_sql is much more flexible approach as indicated by Dick.

Raj

On Wed, Jan 12, 2011 at 10:18 PM, Andrew Kerber <andrew.kerber_at_gmail.com>wrote:

> Before I write this shell script for myself, I thought I would ask if
> anyone has done this before. I have a table of SQL queries (single queries)
> that have to be run against various schemas and instances. The table
> contains all the information I need to run it, including the destination
> file for each query, I just have to write the shell script that will read
> the table, and run the query. I suppose it will actually probably need to
> generate and call the individual sql files that will be run now that I think
> about it. Anyway, has anyone written something like this and have a
> sample? Oracle 10.2.0.4, Solaris and OEL. I could also run it on the
> client machine if necessary, which is running windows 7.
>
> --
> Andrew W. Kerber
>
> 'If at first you dont succeed, dont take up skydiving.'
>

-- 
-----
Best regards
Raj

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 13 2011 - 20:59:12 CST

Original text of this message