dbms_sql2.expand_sql_text() http://jonathanlewis.wordpress.com/2012/07/10/expanding-sql/ Regards Jonathan Lewis ________________________________________ From: oracle-l-bounce@xxxxxxxxxxxxx [oracle-l-bounce@xxxxxxxxxxxxx] on behalf of D'Hooge Freek [Freek.DHooge@xxxxxxxxx] Sent: 26 November 2013 05:09 To: oracle-l@xxxxxxxxxxxxx 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@xxxxxxxxx<mailto:freek.dhooge@xxxxxxxxx> tel +32(03) 451 23 82 http://www.uptime.be disclaimer: www.uptime.be/disclaimer.html<http://www.uptime.be/disclaimer.html> -- //www.freelists.org/webpage/oracle-l