AnsweredAssumed Answered

Show SQL statements only in Transaction Traces

Question asked by jankei on Dec 12, 2012
Latest reply on Dec 13, 2012 by jankei
Is there any possibility to show the SQL statements only in transaction traces? I think the FullTTDetailsTracer will not work for that, am I right? This is the part in the sqlagent-6.1.pbd where the sql statement instrumentation is made.
#######################
# Statement instrumentation
# ================

TurnOn: SQLAgentStatements

# Modified from Backends to JDBC string base
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute()Z StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery()Ljava/sql/ResultSet; StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery(Ljava/lang/String;)Ljava/sql/ResultSet; StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;)I StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;I)Z StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;[I)Z StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;[Ljava/lang/String;)Z StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;)Z StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate()I StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;)I StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;I)I StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;[I)I StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;[Ljava/lang/String;)I StatementBackendTracer "JDBC|SQL"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeBatch()[I StatementBackendTracer "JDBC|SQL"

# Modified from Backends to JDBC string base
# Modified Tracer names DbCommand...Tracer to accomodate having modified metric names for each section: General, Query, Update
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute()Z DbCommandGeneralTracer "JDBC|SQL|{commandtype}|General|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery()Ljava/sql/ResultSet; DbCommandQueryTracer "JDBC|SQL|{commandtype}|Query|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery()Ljava/sql/ResultSet; ResultSetToSQLMappingTracer SQLAgent
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery(Ljava/lang/String;)Ljava/sql/ResultSet; DbCommandQueryTracer "JDBC|SQL|{commandtype}|Query|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery(Ljava/lang/String;)Ljava/sql/ResultSet; ResultSetToDynamicSQLMappingTracer SQLAgent
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;)Z DbCommandGeneralTracer "JDBC|SQL|{commandtype}|General|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;I)Z DbCommandGeneralTracer "JDBC|SQL|{commandtype}|General|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;[I)Z DbCommandGeneralTracer "JDBC|SQL|{commandtype}|General|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;[Ljava/lang/String;)Z DbCommandGeneralTracer "JDBC|SQL|{commandtype}|General|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate()I DbCommandUpdateTracer "JDBC|SQL|{commandtype}|Update|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;)I DbCommandUpdateTracer "JDBC|SQL|{commandtype}|Update|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;I)I DbCommandUpdateTracer "JDBC|SQL|{commandtype}|Update|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;[I)I DbCommandUpdateTracer "JDBC|SQL|{commandtype}|Update|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;[Ljava/lang/String;)I DbCommandUpdateTracer "JDBC|SQL|{commandtype}|Update|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeBatch()[I DbCommandQueryTracer "JDBC|SQL|{commandtype}|Query|{sql}"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements getResultSet()Ljava/sql/ResultSet; ResultSetToSQLMappingTracer SQLAgent


# Modified from Backends to JDBC string base
# Added MethodRateTracer to add Queries per Second metric
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute()Z MethodRateTracer "JDBC|SQL|{commandtype}|General|{sql}:Statements Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery()Ljava/sql/ResultSet; MethodRateTracer "JDBC|SQL|{commandtype}|Query|{sql}:Queries Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeQuery(Ljava/lang/String;)Ljava/sql/ResultSet; MethodRateTracer "JDBC|SQL|{commandtype}|Query|{sql}:Queries Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;)Z MethodRateTracer "JDBC|SQL|{commandtype}|General|{sql}:Statements Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;I)Z MethodRateTracer "JDBC|SQL|{commandtype}|General|{sql}:Statements Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;[I)Z MethodRateTracer "JDBC|SQL|{commandtype}|General|{sql}:Statements Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements execute(Ljava/lang/String;[Ljava/lang/String;)Z MethodRateTracer "JDBC|SQL|{commandtype}|General|{sql}:Statements Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate()I MethodRateTracer "JDBC|SQL|{commandtype}|Update|{sql}:Updates Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;)I MethodRateTracer "JDBC|SQL|{commandtype}|Update|{sql}:Updates Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;I)I MethodRateTracer "JDBC|SQL|{commandtype}|Update|{sql}:Updates Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;[I)I MethodRateTracer "JDBC|SQL|{commandtype}|Update|{sql}:Updates Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeUpdate(Ljava/lang/String;[Ljava/lang/String;)I MethodRateTracer "JDBC|SQL|{commandtype}|Update|{sql}:Updates Per Second"
TraceOneMethodWithParametersIfFlagged: SQLAgentStatements executeBatch()[I MethodRateTracer "JDBC|SQL|{commandtype}|Query|{sql}:Queries Per Second"

Outcomes