# Continuous Data from SQL Server into Logstash

**URL:** <https://discuss.elastic.co/t/continuous-data-from-sql-server-into-logstash/159929>\
**Category:** Logstash\
**Created:** [December 7, 2018, 12:35pm UTC](https://discuss.elastic.co/t/continuous-data-from-sql-server-into-logstash/159929 "2018-12-07T12:35:29Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![mubarak\_shaik](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@mubarak\_shaik](https://discuss.elastic.co/u/mubarak_shaik)\
**Post date:** [December 13, 2018, 6:56am UTC](https://discuss.elastic.co/t/continuous-data-from-sql-server-into-logstash/159929/10 "2018-12-13T06:56:16Z")

</div>

Hi ,

Please try with some ID Value first in where condition.

input {  
jdbc {  
jdbc\_driver\_library =\> "D:/Softwares/logstash/lib/com.mysql.jdbc\_5.1.5.jar"  
jdbc\_driver\_class =\> "com.mysql.jdbc.Driver"  
jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/testdb"  
jdbc\_user =\> "root"  
jdbc\_password =\> "root"  
statement =\> "SELECT id,name FROM sample where id \> 1"  
tracking\_column =\> "id"  
last\_run\_metadata\_path =\> "C:/Users/XXXXXX/.logstash\_jdbc\_last\_run"  
schedule =\> "\*/1 \* \* \* \*"  
}  
}

output {  
elasticsearch {  
hosts =\> ["localhost:9200"]  
index =\> "idx\_mysqldata"  
}  
stdout { codec =\> rubydebug }

}

Then check your results first.

---

_[View the full topic](https://discuss.elastic.co/t/continuous-data-from-sql-server-into-logstash/159929)._
