# Why I am getting this error when using JDBC input plugin of Logstash

**URL:** <https://discuss.elastic.co/t/why-i-am-getting-this-error-when-using-jdbc-input-plugin-of-logstash/237988>\
**Category:** Logstash\
**Created:** [June 22, 2020, 2:23am UTC](https://discuss.elastic.co/t/why-i-am-getting-this-error-when-using-jdbc-input-plugin-of-logstash/237988 "2020-06-22T02:23:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)\
**Post date:** [June 22, 2020, 7:19am UTC](https://discuss.elastic.co/t/why-i-am-getting-this-error-when-using-jdbc-input-plugin-of-logstash/237988/4 "2020-06-22T07:19:06Z")

</div>

I know that in your case you are not calling a stored procedure, but I think this solution could apply to your problem as well as the plugin apparently only creates the "`SELECT TOP (1) …` " query in debug mode?

> [@Logstash cannot call SQL Stored Procedure](https://discuss.elastic.co/t/logstash-cannot-call-sql-stored-procedure/44271/13):
>
> @Ashish_Viradia I found this to be a bug, if you run logstash in debug mode the jdbc plugin will do a SELECT TOP(1) on the stored procedure which is invalid. However, if logstash is not in debug mode then it works fine. Not the best solution but at least a work around. E

---

_[View the full topic](https://discuss.elastic.co/t/why-i-am-getting-this-error-when-using-jdbc-input-plugin-of-logstash/237988)._
