RE: expanding sql statements on views

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 26 Nov 2013 07:18:35 +0000
Message-ID: <CE70217733273F49A8A162EE074F64D901DCB7DF_at_exmbx05.thus.corp>


dbms_sql2.expand_sql_text()

http://jonathanlewis.wordpress.com/2012/07/10/expanding-sql/

Regards
Jonathan Lewis



From: oracle-l-bounce_at_freelists.org [oracle-l-bounce_at_freelists.org] on behalf of D'Hooge Freek [Freek.DHooge_at_uptime.be] Sent: 26 November 2013 05:09
To: oracle-l_at_freelists.org
Subject: expanding sql statements on views

Hi,

I'm tuning some queries and the developers seem to be quite fond of nesting views in views in ... To get a better understanding of all tables involved I would like to see the expanded statement, where the referenced views are replaced with their actual text. In 12c there is apparently a procedure for this, dbms_utility.expand_sql_text, which does exactly that. I thought there was also a way to do this in 11, but I can't remember how. Does someone know of a way to get the full, expanded, sql or the sql after all view merging and such?

Kind regards,

--

Freek D'Hooge
Uptime
Oracle Database Administrator
email: freek.dhooge_at_uptime.be<mailto:freek.dhooge_at_uptime.be> tel +32(03) 451 23 82
http://www.uptime.be
disclaimer: www.uptime.be/disclaimer.html<http://www.uptime.be/disclaimer.html>

--

http://www.freelists.org/webpage/oracle-l Received on Tue Nov 26 2013 - 08:18:35 CET

Original text of this message