There was a situation where I needed to extract the swql/sql from pages which didn't load.
It look a bit of doing, but it was a simple matter of searching for the name of the view/resource and dump the data.
I tried to do in SWQL, but could find the "ResourceProperties" in SWQL.
SELECT v.ViewGroupName, v.ViewTitle
,r.ResourceTitle, rp.PropertyName, rp.PropertyValue
FROM Views v
join Resources r on r.ViewID = v.ViewID
join ResourceProperties rp on rp.ResourceID=r.ResourceID
where rp.PropertyName in('sql','swql') and ViewGroupName like '%LookAtMe%'
--where rp.PropertyName in('sql','swql') and r.ResourceTitle like '%Cleanup%'
This is just something useful to have in the toolbox.
Amit