Reputation: 3018
When I execute SQL statements without parameters I can see them in the profiler but when I set a parameter it just displays as SELECT 1
.
Is there any explanation for this? Is there a switch where I can turn this feature on for parameters?
Upvotes: 2
Views: 648
Reputation: 13450
You could also capture SQL:StmtStarting
, Prepare SQL
, Exec Prepared SQL
(in TSQL) and SP:stmtStarting
, RPC:Starting
(in Stored Procedures) events. With them you should capture all queries.
This SELECT 1
isn't related to your parameterized queries. If it isn't something that you sent, then the JDBC driver could be executing them to check the connection or something similar.
Upvotes: 2