# LOGSTASH NOT EXECUTE SQL STORE PROCEDURE

**URL:** <https://discuss.elastic.co/t/logstash-not-execute-sql-store-procedure/164135>\
**Category:** Logstash\
**Created:** [January 14, 2019, 12:00pm UTC](https://discuss.elastic.co/t/logstash-not-execute-sql-store-procedure/164135 "2019-01-14T12:00:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidewuado](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@aidewuado](https://discuss.elastic.co/u/aidewuado)\
**Post date:** [January 14, 2019, 12:00pm UTC](https://discuss.elastic.co/t/logstash-not-execute-sql-store-procedure/164135/1 "2019-01-14T12:00:55Z")

</div>

hello im try to execute store procedure in logstash and not work, im view de 1[[Logstash cannot call SQL Stored Procedure](https://discuss.elastic.co/t/logstash-cannot-call-sql-stored-procedure/44271)] but not ecute my sp.  
that is my code:

errorlog.conf:  
input {  
jdbc {  
jdbc\_driver\_library =\> "/home/java/mssql-jdbc-7.0.0.jre8.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
jdbc\_connection\_string =\> "jdbc:sqlserver://lab-sql2.e-contact.cl;database=master;loginTimeout=30;"  
jdbc\_password =\> "test"  
jdbc\_user =\> "test"  
schedule =\> "\* \* \* \* _"  
 #statement =\> "SELECT 1 AS ID , 2 AS PEPITO"  
 #statement =\> "SELECT servername ,traking FROM DBA.dbo.errorLog"  
statement\_filepath =\> "/etc/logstash/scripts/errorLog.txt"  
jdbc\_paging\_enabled =\> "true"  
last\_run\_metadata\_path =\> "/home/.logstash\_jdbc\_last\_run"  
}  
}  
that is the error  
[2019-01-14T08:52:02,353][ERROR][logstash.inputs.jdbc] Java::ComMicrosoftSqlserverJdbc::SQLServerException: Incorrect syntax near the keyword 'execute'.: SELECT TOP (1) count(_) AS [COUNT] FROM (execute dbo.dbaSP\_readErrLog  
) AS [T1]  
[2019-01-14T08:52:02,398][WARN][logstash.inputs.jdbc] Exception when executing JDBC query {:exception=\>#\<Sequel::DatabaseError: Java::ComMicrosoftSqlserverJdbc::SQLServerException: Incorrect syntax near the keyword 'execute'.\>}  
[2019-01-14T08:52:16,820][WARN][logstash.runner] SIGTERM received. Shutting down.  
[2019-01-14T08:52:17,751][INFO][logstash.pipeline] Pipeline has terminated {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x27210cf2 run\>"}

---

<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:** [February 11, 2019, 12:11pm UTC](https://discuss.elastic.co/t/logstash-not-execute-sql-store-procedure/164135/2 "2019-02-11T12:11:14Z")

</div>

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