Re: Program interacting with SQL*Plus
Date: 30 Jun 2002 09:09:19 -0700
Message-ID: <f3f332ed.0206300809.4be5f6ed_at_posting.google.com>
David,
[Quoted] Thank you for the helpful post. Let me try to summarize your approach
(please correct me where I am mistaken).
- Create a temporary .sql file
- Write to file commands to turn spooling on
- Write to file PL/SQL blocks and/or SQL*Plus commands to run
- Write to file commands to turn spooling off and exit
- Start SQL*Plus, giving the name of the temporary file
- Check the spool file for output
This seems to work well. It was easy to implement and is useful. However, I would like a more general approach. I would like to leave a session running and feed commands when needed, and read output when needed. I don't know much about Unix pipes, but could this be accomplished if the spool file and the temp.sql file were FIFO-PIPES? Is there another approach that would allow this kind of programmatic interaction with SQL*Plus?
Thanks
David Van Horn
"David Simpson" <dsimpson_at_dotcomsolutionsinc.net> wrote in message news:<dovT8.352640$352.42589_at_sccrnsc02>...
> David,
> Here is a script which I use on Solaris to monitory standby databases which
> could give you some ideas for accomplishing your sqlplus tasks:
> http://www.dotcomsolutionsinc.net/products/installgen/sol_901_32bit_files/in
> stallgen_sol901_79_.html
>
> This is a Perl script, but the same ideas could be performed with shell
> scripts too.
>
> David Simpson
> www.dotcomsolutionsinc.net
Received on Sun Jun 30 2002 - 18:09:19 CEST
