Hi every way to trace geometric network with SQL function in the database. For example, the oid of source feature to the function and then trace downstream line and give the oid of sink .
I don't know but you could take a trace downstream line with toolbar ArcGIS and in sql server runs Create a Trace (SQL Server Profiler) (video 21-How to trace incoming SQL statements to SQL Server Database (using SQL Server Profiler) - YouTube ) so you trace the query for this task ...
Thanks to the call of my friends actually I need to trace geometric network in database environment and use toolbar do not useful , Using the query analysis tool is not useful
for example in postgresql database with postgis can trace path in database please see this sample :