# Logstash Jdbc Metadata path not creating

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-metadata-path-not-creating/264652>\
**Category:** Logstash\
**Created:** [February 18, 2021, 6:41am UTC](https://discuss.elastic.co/t/logstash-jdbc-metadata-path-not-creating/264652 "2021-02-18T06:41:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryce\_Fernandes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bryce_fernandes/32/71166_2.png) [@Bryce\_Fernandes](https://discuss.elastic.co/u/Bryce_Fernandes)\
**Post date:** [February 18, 2021, 6:41am UTC](https://discuss.elastic.co/t/logstash-jdbc-metadata-path-not-creating/264652/1 "2021-02-18T06:41:11Z")

</div>

Hi,

I have a database and using jdbc plugin to fetch data from it. I have used sql last value and given metadata path it was getting created at first. I deleted and tried to create again but not creating since then. I manually tried to create file and give value but the file is getting deleted on its own.  
Also tried clean\_run=true but not working.

Following is my code:

```auto
    input {

      jdbc {
        clean_run => true
        jdbc_driver_library => "/etc/logstash/sqljdbc_4.2.8112.200_enu/sqljdbc_4.2/enu/jre8/sqljdbc42.jar"
        jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
        jdbc_connection_string => "jdbc:sqlserver://10.9.240.216:1433;database=DB_MB_TAB_CONFIG"
        jdbc_user => "user"
        jdbc_password => "password"
        schedule => "* * * * *"
        statement => "SELECT * FROM TB_ASLG_TXN_DETAIL WHERE create_ts > :sql_last_value"
        use_column_value => true
        tracking_column_type => "timestamp"
        tracking_column => "create_ts"
        last_run_metadata_path => "/etc/logstash/conf.d/metadata/logstash_jdbc_last_run.txt"
        tags => ["sql-uat"]
      }
    }

```

Regards,  
Bryce Fernandes.

---

<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:** [March 18, 2021, 6:41am UTC](https://discuss.elastic.co/t/logstash-jdbc-metadata-path-not-creating/264652/2 "2021-03-18T06:41:22Z")

</div>

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