AppDynamics Knowledge Base

How do I increase the maximum SQL capture length?

How do I increase the maximum SQL capture length?

If you have changed your SQL capture settings from filter parameter values to capture raw SQL, longer SQL queries are now truncated to 999 characters. To change this character limit within the Controller, edit or register a new node property.

In the Controller UI, click on Tiers and Nodes in the left navigation bar. Then double click on the node you'd like to configure, and click Agents > App Server Agent > Configure. This will open the App Server Configuration window. 

At the node level, click on the Use Custom Configuration button. Then either search for the max-length-batch-sql property and double click on it, or click on the gray plus sign to create a new agent property if the max-length-batch-sql property does not already exist.

In the Create Agent Property window, provide values for the name, description, type, and value of the new property (see example and screenshot below). Click the save button to close the window.

Then click the save button after adding the new configuration. A "saved successfully" message should appear in the top right corner of the window when done correctly.

Lastly, exit the App Server Configuration window and click the reset button. This will allow the agent to inherit the new changes.

For additional information, see documentation on how to add a registered node property.

Example:

Name = max-length-batch-sql
Description = Increases character limit for SQL queries

Type = Integer
Value = 2000

 

image.png

Labels (1)
Comments

Is there any limit on the # of characters for SQL query?

We increased to 2000 and these are still truncated and I have been requested to change to 4000.

Hi @Sanjay.Girotra

  • There is a 500-character limit on the length of the SQL statement. Do not use any truncated queries that might appear in the SQL Statements list or a snapshot.
  • The overall number of executions of SQL queries configured to collect Analytics data is limited to 10K. This is configurable using the analytics-sql-cpm-limit node property. See App Agent Node Properties Reference1.
 See Collect Business Data from SQL Calls for further details.

 

Hi @Sanjay.Girotra 

Did increasing the property "max-length-batch-sql" solve the problem? I am facing the same issue

Hello, @Konrad.Wenc –
Just checking in to see how the property increase you mentioned above ended up working for you?  

Claudia Landivar
Community Manager & Editor

Hello @Claudia.Landivar 

This property increase didn't work for me, but I found out another property called 

max-prepared-statement-sql-length

that worked for SQL statement in Transaction Drill-down window -> DB & Remote Service Calls tab. That was what I was looking for.

Hi @Konrad.Wenc  — thanks for following up with what worked for you. Just to let you know, I'm actively working with a subject-matter expert to revise this article. —Claudia

Version history
Last update:
‎03-22-2017 10:39 AM
Updated by: