RE: Capturing Query Text of Prepared Statements in Profiler
- From: asaxton@xxxxxxxxxxxxxxxxxxxx (Adam Saxton [MSFT])
- Date: Fri, 02 Nov 2007 21:01:27 GMT
You can enable JDBC tracing on the driver side. This will contain the SQL
Statement used when it is initially prepared. The following document
discusses how to enable the tracing feature of our Driver.
Tracing Driver Operation
http://msdn2.microsoft.com/en-us/library/ms378517.aspx
From the SQL Side, if you have the plan handle, you can use thesys.dm_exec_query_plan function to get the query plan. This will contain
the Statement that was being used.
SQL Server 2005 Books Online (September 2007)
sys.dm_exec_query_plan
http://technet.microsoft.com/en-us/library/ms189747.aspx
Thanks,
Adam W. Saxton [MSFT]
.
- Prev by Date: Re: getSchemas() doesn't return a full list of schemas. Driver Bug
- Next by Date: Re: Microsoft SQL Server 2005 JDBC Driver v1.2 public available
- Previous by thread: Re: getSchemas() doesn't return a full list of schemas. Driver Bug
- Next by thread: Re: Microsoft SQL Server 2005 JDBC Driver v1.2 public available
- Index(es):
Relevant Pages
|