# Logstash jdbc input filter broken

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-input-filter-broken/60507>\
**Category:** Logstash\
**Created:** [September 14, 2016, 1:39pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-filter-broken/60507 "2016-09-14T13:39:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![biswajit86](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biswajit86](https://discuss.elastic.co/u/biswajit86)\
**Post date:** [September 14, 2016, 1:39pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-filter-broken/60507/1 "2016-09-14T13:39:13Z")

</div>

Hi,

I am using the `tracking_column` functionality of logstash jdbc input plugin to fetch database values from the db. Right now, the functionality to write the last `:sql_last_value"` into the metadata path seems to broken. I monitored the metadata file and it seems every new update increments the value in last\_run\_metadata\_file by exactly 1.

```
value at 12:45 -> 10038238 
value at 12:50 -> 10038239
value at 12:50 -> 10038240

```

I have provided the config below.I am on the latest stable release of logstash (4.6.0) but this functionality seems to be broken in the previous version as well.

```
jdbc_driver_library => "/home/user/utils/lib/jtds-1.3.1.jar"
jdbc_driver_class => "Java::net.sourceforge.jtds.jdbc.Driver"
jdbc_connection_string => "jdbc:jtds:sqlserver://hostanme.com:10503/log"
jdbc_user => "user"
jdbc_password => "password"
schedule => "*/5 * * * *"
use_column_value => true
tracking_column => id
last_run_metadata_path => "/home/user/logstash_restart_analysis_last_run_prod"
statement => "select * from alerts al
where al.id > :sql_last_value"
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:38am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-filter-broken/60507/2 "2017-07-06T04:38:30Z")

</div>


