Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: bind variables and sql*plus

Re: bind variables and sql*plus

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 3 Mar 2003 20:54:12 -0600
Message-ID: <ubs0rmzv5.fsf@hotpop.com>


On Mon, 24 Feb 2003, noone_at_nowhere.com wrote:
> Should binds be used instead of substitution variables in SQL*Plus?

Yes.

> I'm well aware of the potential disasters of not using bind variables.
> We have plans to run some production processes through SQL*Plus (for
> simplicity). These scripts may be called thousands of times a day
> with a wide variety of command line parameters.

[...]

> My rationale was that this would reduce the amount of wasted
> resources. Also, these small statements should fit easily into any
> holes created by fragmentation.
>
> Does my recommendation make sense?
> Is there a better way to handle this?

Beyond the binding issue, I see the number of sqlplus connections opened and closed as an issue, unless you are going to execute endless loops with some way of changing the parameters of the scripts without shutting down sqlplus each time.

This is where a continuous connection comes in quite handy.

I would download the beanshell jar from www.beanshell.org. Then script this with java, (if you want scripting for simplicity). Or, just code some java. What you are trying to do shouldn't be all that difficult to code in java and then you could bind while keeping the same connection alive for all the work.

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Mon Mar 03 2003 - 20:54:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US