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: Parsing SQL-statement before executing?

Re: Parsing SQL-statement before executing?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 22 Jul 1999 11:16:50 +0100
Message-ID: <932639106.29573.0.nnrp-04.9e984b29@news.demon.co.uk>

Depending on what you are trying to achieve you may get some benefit from EXPLAIN PLAN.

Create a publicly visible plan_table, and write a little wrapper which does:

explain plan
set statement_id = '{generated unique identifier}' for
{the user's SQL}
;

rollback;

EXPLAIN PLAN will parse the statement and derive an execution plan (inserting it into the plan_table) without executing the statement if the statement can be parsed at all.

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Magnus Rosenquist wrote in message <7n3s2k$mlm$1_at_vega.lejonet.se>...
>Hi !
>
>Anybody out there who knows if it's possible
>to parse a sql-statement before you execute it?
>
>I'm allowing the users to write their own statements from
>a client, the statement will then be executed in batch so
>any eventual errors will not be displayed until the batch is
>executed.
>
>Is there a way of parsing the statement by using some
>Oracle function and display the outcome to the user?
Received on Thu Jul 22 1999 - 05:16:50 CDT

Original text of this message

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