# Unable to connect to SQL database using jdbc driver

**URL:** <https://discuss.elastic.co/t/unable-to-connect-to-sql-database-using-jdbc-driver/205838>\
**Category:** Logstash\
**Created:** [October 30, 2019, 11:48am UTC](https://discuss.elastic.co/t/unable-to-connect-to-sql-database-using-jdbc-driver/205838 "2019-10-30T11:48:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mduduzi](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@mduduzi](https://discuss.elastic.co/u/mduduzi)\
**Post date:** [October 30, 2019, 11:48am UTC](https://discuss.elastic.co/t/unable-to-connect-to-sql-database-using-jdbc-driver/205838/1 "2019-10-30T11:48:25Z")

</div>

Hi

Am experiencing connection issues when trying to connect to sql database using jdbc driver.  
I'm using intergrated security for connection but error shows l require a jdbc user. Is it correct to be requested of a username when using intergrated security ?

See below connection string and logstash error log

input {  
jdbc {  
# SqlServer jdbc connection string to our database, employeedb  
# "jdbc:sqlserver://HostName\instanceName;database=DBName;user=UserName;password=Password"  
jdbc\_connection\_string =\> "jdbc:sqlserver://MPWETLP1/databaseName=DBName;integratedSecurity=true"  
# The path to our downloaded jdbc driver  
jdbc\_driver\_library =\> "C:\Program Files\Microsoft JDBC Driver 6.2 for SQL Server\sqljdbc\_6.2\enu\sqljdbc4-2.0.jar"  
# The name of the driver class for SqlServer  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
# Query for testing purpose  
statement =\> "SELECT TOP 10 \* from dbo.EB\_Errorlog"  
}  
}

output {  
#stdout { codec =\> json\_lines }  
elasticsearch {  
hosts =\> ["localhost:9200"]  
}  
}

[2019-10-30T13:37:31,403][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.3.1"}  
[2019-10-30T13:37:31,809][INFO][org.reflections.Reflections] Reflections took 47 ms to scan 1 urls, producing 19 keys and 39 values  
[2019-10-30T13:37:31,903][ERROR][logstash.inputs.jdbc] Missing a required setting for the jdbc input plugin:

input {  
jdbc {  
jdbc\_user =\> # SETTING MISSING  
...  
}  
}  
[2019-10-30T13:37:31,903][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Something is wrong with your configuration.", :backtrace=\>["C:/ELK-Stack/logstash-7.3.1/logstash-core/lib/logstash/config/mixin.rb:87:in `config_init'", "C:/ELK-Stack/logstash-7.3.1/logstash-core/lib/logstash/inputs/base.rb:60:in `initialize'", "org/logstash/plugins/PluginFactoryExt.java:258:in `plugin'", "org/logstash/plugins/PluginFactoryExt.java:120:in `buildInput'", "org/logstash/execution/JavaBasePipelineExt.java:50:in `initialize'", "C:/ELK-Stack/logstash-7.3.1/logstash-core/lib/logstash/java_pipeline.rb:24:in `initialize'", "C:/ELK-Stack/logstash-7.3.1/logstash-core/lib/logstash/pipeline\_action/create.rb:36:in `execute'", "C:/ELK-Stack/logstash-7.3.1/logstash-core/lib/logstash/agent.rb:325:in `block in converge\_state'"]}  
[2019-10-30T13:37:32,106][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2019-10-30T13:37:37,227][INFO][logstash.runner] Logstash shut down.

---

<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:** [November 27, 2019, 11:48am UTC](https://discuss.elastic.co/t/unable-to-connect-to-sql-database-using-jdbc-driver/205838/2 "2019-11-27T11:48:29Z")

</div>

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