RE: Capturing Query Text of Prepared Statements in Profiler



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 the
sys.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]

.



Relevant Pages

  • Re: SQL 2005 Profiler
    ... printer Microsoft Office Document Image Writer is unknown. ... administrator to install the driver before you log in again. ... Note that if the default trace is enabled, it is directed to the SQL Server log folder. ...
    (microsoft.public.sqlserver.security)
  • Re: TDBC documentation, examples, syntax?
    ... current SQL standards. ... for variable binding at the Tcl level. ... API, I'd probably use Oracle's bound session variables and pass ... As a convenience for driver writers, ...
    (comp.lang.tcl)
  • RE: XA transactions
    ... Which driver and version are you using and where did you locate these ... | I used the following set of instructions to enable XA transactions on our ... | SQL box: ... Create a registry named-value: ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Behavior of Connection.commit()
    ... Does it say "commit" and "rollback" and other SQL commands that affect the transaction state are not allowed? ... How sure can the driver ever be about the state of the transaction? ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: Ndis Miniport Driver with WPP
    ... reallize that you have to jump thru few hoops to get the tracing. ... Now doing all this in a NDIS miniport driver is not easy, ... The steps to implement tracing in a NDIS miniport driver is no different ... from a WDM driver when it comes to XP and later OSes. ...
    (microsoft.public.development.device.drivers)