# Logstash JDBC\_last \_ not updating

**URL:** https://discuss.elastic.co/t/logstash-jdbc-last-not-updating/285993
**Category:** Logstash
**Created:** [October 6, 2021, 8:16am UTC](https://discuss.elastic.co/t/logstash-jdbc-last-not-updating/285993 "2021-10-06T08:16:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Akshaya](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@Akshaya](https://discuss.elastic.co/u/Akshaya)
#### Post date: [October 6, 2021, 8:16am UTC](https://discuss.elastic.co/t/logstash-jdbc-last-not-updating/285993/1 "2021-10-06T08:16:14Z")

</div>

Hi ,

I'm new to Elasticsearch and Logstash, trying to implement JDBC plugin.  
I'm not sure why .logstash\_last\_run file is not getting updated. The values inside the file remains the same even after several runs.  
value in file:  
--- 0

Logstash conf file  
input {  
jdbc {  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "C:\Users\xxxx\Oracle\ojdbc\ojdbc7.jar"  
jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver"  
jdbc\_connection\_string =\> "jdbc:oracle:thin:@xxxxxxx:xxxx/xx"  
jdbc\_user =\> "xxxx"  
jdbc\_password =\> "xxxxx"  
schedule =\> "\* \* \* \* \*"  
statement =\> "SELECT SNO, UNITID FROM CONTAINERS WHERE SNO \> :sql\_last\_value order by SNO"  
clean\_run =\> true  
use\_column\_value =\> true  
tracking\_column =\> "SNO"  
tracking\_column\_type =\> "numeric"  
last\_run\_metadata\_path =\> "C:\Users\xxxx.logstash\_jdbc\_last\_run"  
}

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [October 6, 2021, 2:57pm UTC](https://discuss.elastic.co/t/logstash-jdbc-last-not-updating/285993/2 "2021-10-06T14:57:49Z")

</div>

If you use 'clean\_run =\> true' the contents of the file will get set to 0 each time the input is initialized.

---

<div class="post-metadata">

### Author: ![Akshaya](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@Akshaya](https://discuss.elastic.co/u/Akshaya)
#### Post date: [October 6, 2021, 3:11pm UTC](https://discuss.elastic.co/t/logstash-jdbc-last-not-updating/285993/3 "2021-10-06T15:11:01Z")

</div>

Thanks a lot for the reply

---

<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: [November 3, 2021, 3:11pm UTC](https://discuss.elastic.co/t/logstash-jdbc-last-not-updating/285993/4 "2021-11-03T15:11:41Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
