# Custom JDBC Extension

**URL:** <https://community.dynatrace.com/t/custom-jdbc-extension/55232>\
**Category:** Extensions\
**Tags:** jdbc, sybase, extensions\
**Created:** [March 10, 2026, 10:28pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232 "2026-03-10T22:28:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Das-Niharika](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Das-Niharika](https://community.dynatrace.com/u/Das-Niharika)\
**Post date:** [March 10, 2026, 10:28pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/1 "2026-03-10T22:28:44Z")

</div>

Hi , I am creating a custom jdbc extension using Extension creator. where I have to pass the query and a Go statement in the next line . Below is my yaml.

I have deployed it . Created the monitoring configuration . But the status shows a warning saying that&nbsp; **Query has failed: Incorrect syntax near ‘Go’.** How can I pass multiline query here ? This is for Sybase query so it ways needs a Go statement after the query.

Can someone pls help ?

name: "custom:sybase-vipserver"minDynatraceVersion: "1.303.0"author:&nbsp; name: "Custom Extensions Creator App"version: "1.0.1"jdbc:&nbsp; driverClassName: “com.sybase.jdbc4.jdbc.SybDriver”&nbsp; validationQuery: “SELECT 1”&nbsp; versionQuery: “SELECT 1”&nbsp; connectionStringPattern: “^jdbc:sybase:.\*$”&nbsp; connectionStringPatternErrorMessage: “The connection string must be a valid JDBC&nbsp; &nbsp; sybase connection string starting with ‘jdbc:sybase:’, check:&nbsp; &nbsp; [SyBooks Online](https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.d%5C)&nbsp; &nbsp; c39001.0605/html/prjdbc/prjdbc14.htm”&nbsp; errorMessage: “An error occurred while trying to connect to the database. Please&nbsp; &nbsp; check the connection details and try again.”&nbsp; groups:&nbsp; &nbsp; - group: “SybaseDatabases”&nbsp; &nbsp; &nbsp; featureSet: “databases”&nbsp; &nbsp; &nbsp; query: “select @@servername &nbsp;+ ’ connection successful’ as ‘ActiveServer’\  
&nbsp; &nbsp; &nbsp; &nbsp; \ Go”&nbsp; &nbsp; &nbsp; timeout: “60”&nbsp; &nbsp; &nbsp; metrics:&nbsp; &nbsp; &nbsp; &nbsp; - key: “sybase.vipserver”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:ActiveServer”&nbsp; &nbsp; &nbsp; dimensions:&nbsp; &nbsp; &nbsp; &nbsp; - key: “database”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:database”

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [March 11, 2026, 2:35am UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/2 "2026-03-11T02:35:23Z")

</div>

[@Das-Niharika](https://community.dynatrace.com/user/87868)

I would say don’t use GO. It’s not valid SQL for the database engine—GO is just a client-side batch separator used by tools like isql/sqsh/DBArtisan. The Dynatrace JDBC extension sends your query straight to the JDBC driver, so the server sees the literal text “Go” and errors out

Use a YAML multiline block and remove GO

Thanks,

Sujit K Singh

---

<div class="post-metadata">

**Author:** ![Das-Niharika](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Das-Niharika](https://community.dynatrace.com/u/Das-Niharika)\
**Post date:** [March 11, 2026, 6:32pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/3 "2026-03-11T18:32:36Z")

</div>

Hi&nbsp;[@sujit\_k\_singh](https://community.dynatrace.com/user/67382)&nbsp;,

Thanks for your response . I have removed GO . When you say ‘use a YAML multiline code’ is this the below change in red&nbsp; what is expected ? if so , after deploying this it throws a warning message saying&nbsp;&nbsp; **Endpoint jdbc:sybase:Tds:10.39.33.11:2138?ENABLE\_SSL=true&SSL\_TRUST\_ALL\_CERTS=true&CHARSET=iso\_1&CHARSET=iso\_1&DYNAMIC\_PREPARE=false group ‘SybaseDatabases’ did not produce any metrics. Subgroups will not be polled.**

name: "custom:sybase-vipserver"minDynatraceVersion: "1.303.0"author:&nbsp; name: "Custom Extensions Creator App"version: "1.0.5"jdbc:&nbsp; driverClassName: “com.sybase.jdbc4.jdbc.SybDriver”&nbsp; validationQuery: “SELECT 1”&nbsp; versionQuery: “SELECT 1”&nbsp; connectionStringPattern: “^jdbc:sybase:.\*$”&nbsp; connectionStringPatternErrorMessage: “The connection string must be a valid JDBC&nbsp; &nbsp; sybase connection string starting with ‘jdbc:sybase:’, check:&nbsp; &nbsp; [SyBooks Online](https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.d%5C)&nbsp; &nbsp; c39001.0605/html/prjdbc/prjdbc14.htm”&nbsp; errorMessage: “An error occurred while trying to connect to the database. Please&nbsp; &nbsp; check the connection details and try again.”&nbsp; groups:&nbsp; &nbsp; - group: “SybaseDatabases”&nbsp; &nbsp; &nbsp; featureSet: “databases”&nbsp; &nbsp; &nbsp; query: |&nbsp; &nbsp; &nbsp; &nbsp; select @@servername &nbsp;+ ’ connection successful’ as ‘ActiveServer’&nbsp; &nbsp; &nbsp; timeout: “60”&nbsp; &nbsp; &nbsp; metrics:&nbsp; &nbsp; &nbsp; &nbsp; - key: “sybase.vipserver”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:ActiveServer”&nbsp; &nbsp; &nbsp; dimensions:&nbsp; &nbsp; &nbsp; &nbsp; - key: “database”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:database”

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [March 11, 2026, 9:27pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/4 "2026-03-11T21:27:48Z")

</div>

Hi&nbsp;[@Das-Niharika](https://community.dynatrace.com/user/87868)

Endpoint … group ‘SybaseDatabases’ did not produce any metrics. Subgroups will not be polled.

usually means the query ran but Dynatrace couldn’t map any numeric value to a metric (or the result set didn’t match the mappings), so the group yielded zero metrics.

Can you add this

groups:&nbsp; - group: “SybaseDatabases”&nbsp;&nbsp;&nbsp; featureSet: “databases”&nbsp;&nbsp;&nbsp; query: |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 as value,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @@servername + ’ connection successful’ as ActiveServer,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; db\_name() as database&nbsp;&nbsp;&nbsp; timeout: “60”&nbsp;&nbsp;&nbsp; metrics:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - key: “sybase.vipserver”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value: “col:value”&nbsp;&nbsp;&nbsp; dimensions:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - key: “active\_server”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value: “col:ActiveServer”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - key: “database”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value: "col:database"If you still get the “did not produce any metrics” warning after this, grab the extension execution logs for that endpoint.

---

<div class="post-metadata">

**Author:** ![Das-Niharika](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Das-Niharika](https://community.dynatrace.com/u/Das-Niharika)\
**Post date:** [March 11, 2026, 10:01pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/5 "2026-03-11T22:01:08Z")

</div>

Hi&nbsp;[@sujit\_k\_singh](https://community.dynatrace.com/user/67382)&nbsp;- This is the query executed in sybase side . They use “go” to execute the code.

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [March 11, 2026, 11:02pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/6 "2026-03-11T23:02:23Z")

</div>

Hi [@Das-Niharika](https://community.dynatrace.com/user/87868)&nbsp;,

Thanks for checking that and for sharing your side.

Just to clarify the confusion around the “GO” keyword:

In Sybase tools like isql, DBArtisan, and similar SQL clients, GO is handled by the client, not by the Sybase database itself. The client splits the script into separate batches before sending them to Sybase.

When using JDBC (Dynatrace JDBC‑based extensions), the text is sent exactly as written straight to the Sybase server. Since the Sybase server does not understand “GO”, it fails if GO is included.

So both things can appear “true” at the same time:

GO works in SQL tools because the client removes it.

GO does not work in JDBC because it reaches the Sybase server unchanged.

---

<div class="post-metadata">

**Author:** ![Das-Niharika](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Das-Niharika](https://community.dynatrace.com/u/Das-Niharika)\
**Post date:** [March 12, 2026, 3:23pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/7 "2026-03-12T15:23:53Z")

</div>

Thanks a lot&nbsp;[@sujit\_k\_singh](https://community.dynatrace.com/user/67382)&nbsp;- Without “go” it worked . The issue was - I was trying the get the string value in metric . Seems the only the integer value can be assigned to metric and column value (string type) should be assigned to dimension.

I have another issue . I want to customize my query passed in yaml . it should read from connectionstring&nbsp; that is passed and return a value .

Currently it the query is

```auto
select count(@@servername) as 'ActiveServerCount', @@servername as
        'ActiveServer

```

I want to do something like this . Read from connection string , if the hostname is for example - ‘syb\_hadr\_aimmport\_tst.nml.com’ then return ‘TDS\_SY140’

Something similar to below -

select count(@@servername) as ‘ActiveServerCount’, @@servername as 'ActiveServer , \<read from connection string . if hostname is&nbsp;&nbsp; **syb\_hadr\_aimmport\_tst.nml.com** return the value as ‘TDS\_SY140’ as ‘VIP server’ \>

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [March 16, 2026, 5:39am UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/8 "2026-03-16T05:39:31Z")

</div>

Hi&nbsp;[@Das-Niharika](https://community.dynatrace.com/user/87868)

Thanks for the update — great to hear it worked after removing GO. And yes, metrics must come from a numeric column; strings should be mapped as dimensions.

About “reading from the connection string”: the SQL running on Sybase can’t see the JDBC URL used by Dynatrace. That lives on the client side, not inside the database session.

The SQL alone isn’t enough. In JDBC extensions, Dynatrace requires at least one numeric column to be explicitly mapped as a metric; string columns must be mapped as dimensions. Without that mapping, the group executes but produces no metrics.

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [March 16, 2026, 5:43am UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/9 "2026-03-16T05:43:43Z")

</div>

[@Das-Niharika](https://community.dynatrace.com/user/87868)

can you try this,&nbsp;SQL + mapping

 ![Syb.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/91e33be72b76b9b3330e4e67bedc961edc87a128.png)  
Mappingmetrics:&nbsp; - key: “sybase.vipserver”&nbsp;&nbsp;&nbsp; value: "col:value"dimensions:&nbsp; - key: “active\_server”&nbsp;&nbsp;&nbsp; value: “col:ActiveServer”&nbsp; - key: “vip\_server”&nbsp;&nbsp;&nbsp; value: “col:VIPServer”

---

<div class="post-metadata">

**Author:** ![Das-Niharika](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Das-Niharika](https://community.dynatrace.com/u/Das-Niharika)\
**Post date:** [August 24, 2026, 3:52pm UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/10 "2026-08-24T15:52:54Z")

</div>

Hi ,

After Activegate upgrade and with a new Jar file this custom extension is breaking now . Can some one please ?

I am getting this error

An error occurred while trying to connect to the database. Please&nbsp; &nbsp; check the connection details and try again.name: "custom:sybase-vipserver"minDynatraceVersion: "1.303.0"author:&nbsp; name: "Custom Extensions Creator App"version: "1.2.1"jdbc:&nbsp; driverClassName: “com.sybase.jdbc4.jdbc.SybDriver”&nbsp; validationQuery: “SELECT 1”&nbsp; versionQuery: “SELECT 1”&nbsp; connectionStringPattern: “^jdbc:sybase:.\*$”&nbsp; connectionStringPatternErrorMessage: “The connection string must be a valid JDBC&nbsp; &nbsp; sybase connection string starting with ‘jdbc:sybase:’, check:&nbsp; &nbsp; [SyBooks Online](https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.d%5C)&nbsp; &nbsp; c39001.0605/html/prjdbc/prjdbc14.htm”&nbsp; errorMessage: “An error occurred while trying to connect to the database. Please&nbsp; &nbsp; check the connection details and try again.”&nbsp; groups:&nbsp; &nbsp; - group: “SybaseDatabases”&nbsp; &nbsp; &nbsp; featureSet: “databases”&nbsp; &nbsp; &nbsp; query: “SELECT count(@@servername) as ActiveServerCount ,@@servername AS&nbsp; &nbsp; &nbsp; &nbsp; ActiveServer, CASE WHEN @@servername IN (‘TDS\_SY340’,‘TDS\_SY540’) THEN&nbsp; &nbsp; &nbsp; &nbsp; ‘TDS\_SY140’ WHEN @@servername IN (‘SDS\_SY356’,‘SDS\_SY456’) THEN&nbsp; &nbsp; &nbsp; &nbsp; ‘SDS\_SY756’ WHEN @@servername IN (‘TDS\_SY361’,‘TDS\_SY561’) THEN&nbsp; &nbsp; &nbsp; &nbsp; ‘TDS\_SY161’  
&nbsp; &nbsp; &nbsp; &nbsp; WHEN @@servername IN (‘SDS\_SY375’,‘SDS\_SY575’) THEN ‘SDS\_SY175’  
&nbsp; &nbsp; &nbsp; &nbsp; WHEN @@servername IN (‘SDS\_SY324’,‘SDS\_SY524’) THEN ‘SDS\_SY124’ WHEN&nbsp; &nbsp; &nbsp; &nbsp; @@servername IN (‘SDS\_SY570’,‘SDS\_SY370’) THEN ‘SDS\_SY170’  
&nbsp; &nbsp; &nbsp; &nbsp; ELSE NULL &nbsp; &nbsp; END AS vipServer”&nbsp; &nbsp; &nbsp; timeout: “60”&nbsp; &nbsp; &nbsp; metrics:&nbsp; &nbsp; &nbsp; &nbsp; - key: “sybase.activeservercount”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:ActiveServerCount”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type: “gauge”&nbsp; &nbsp; &nbsp; interval:&nbsp; &nbsp; &nbsp; &nbsp; minutes: 1&nbsp; &nbsp; &nbsp; dimensions:&nbsp; &nbsp; &nbsp; &nbsp; - key: “activeserver”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:ActiveServer”&nbsp; &nbsp; &nbsp; &nbsp; - key: “vipserver”&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: “col:vipServer”

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [August 25, 2026, 2:18am UTC](https://community.dynatrace.com/t/custom-jdbc-extension/55232/11 "2026-08-25T02:18:51Z")

</div>

Hi&nbsp;[@Das-Niharika](https://community.dynatrace.com/user/87868)

That generic “An error occurred while trying to connect to the database” message is just the custom errorMessage from your YAML, it’s masking the actual JDBC exception, so the real cause is hidden. A few things worth checking after an ActiveGate upgrade + new JAR:

Confirm the driver JAR was actually redeployed to the new/upgraded ActiveGate  
Custom JDBC driver JARs live in a specific folder per ActiveGate (typically under the extension’s driver directory, e.g. …/remotepluginmodule/agent/lib/extensions/jdbc/\<extension-id\>/). An ActiveGate upgrade can sometimes reset or not carry over custom driver placements — worth verifying the jar is physically present on the AG that’s now polling this endpoint, and that the AG service was restarted after placing it.

Restart the ActiveGate service (dynatraceremoteplugin) to make sure the JVM reloads the classpath with the new driver.

If this doenst fix then pls share the log that would give me more insights.

Thanks,

Sujit
