# Logstash jdbc input for sql express

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-input-for-sql-express/276712>\
**Category:** Logstash\
**Created:** [June 23, 2021, 2:16am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-for-sql-express/276712 "2021-06-23T02:16:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IsAa](https://avatars.discourse-cdn.com/v4/letter/i/6bbea6/32.png) [@IsAa](https://discuss.elastic.co/u/IsAa)\
**Post date:** [June 23, 2021, 2:16am UTC](https://discuss.elastic.co/t/logstash-jdbc-input-for-sql-express/276712/1 "2021-06-23T02:16:48Z")

</div>

Hi,

Does anyone know a good example showing how to configure input for jdbc driver with sqlexpress.

```auto
input {
  jdbc {
	jdbc_driver_library => "C:\JDBC8.4\sqljdbc_8.4\enu\mssql-jdbc-8.4.1.jre14.jar"
	jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver:.\\SQLEXPRESS;database=mydb;"
	jdbc_user => "user"
	jdbc_password => "password"
    statement => "SELECT * from mydbTable"  
  }
}

```

In the logs, I keep getting unable to connect to database

Thanks

---

<div class="post-metadata">

**Author:** ![charles97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles97/32/79243_2.png) [@charles97](https://discuss.elastic.co/u/charles97)\
**Post date:** [July 11, 2021, 2:35pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-for-sql-express/276712/2 "2021-07-11T14:35:21Z")

</div>

I think you should show the logs. There is lot of reasons of that.

---

<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:** [August 8, 2021, 2:35pm UTC](https://discuss.elastic.co/t/logstash-jdbc-input-for-sql-express/276712/3 "2021-08-08T14:35:39Z")

</div>

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