The websites (intranet sites or extranet sites - sometimes web portals) at my company return certain results (which is obtained via SQL queries/commands in the back-end systems). I"m trying to find out which queries are being run in the background and how I could track back the query results onto the tables where they come from. How can I achieve that? I tried looking at the "source" but found no queries there. Back-end uses SQL Server if that matters.
If you have an isolated environment (i.e. no one else can access the pages at the same time) set up and you have appropriate access to the SQL Server you could query the sys.dm_exec_query_stats
table after opening each page to figure out what queries were run to get data for that page.