View Named Query compiled string

Is it possible to view the SQL string being generated for a named query? I have tried using the xEvent profiler on SSMS but it doesn't look like it is hitting my DB. I know the connection works because I can delete my where clause and the query runs. Any ideas?

The gateway.database.selects or gateway.database.updates loggers on TRACE will have the full body of every query issued by the gateway against all of your database connections.

1 Like