# Connecting to MSSQL on version 6.1

**URL:** <https://discuss.elastic.co/t/connecting-to-mssql-on-version-6-1/112721>\
**Category:** Elasticsearch\
**Created:** [December 20, 2017, 9:20pm UTC](https://discuss.elastic.co/t/connecting-to-mssql-on-version-6-1/112721 "2017-12-20T21:20:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paola](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Paola](https://discuss.elastic.co/u/Paola)\
**Post date:** [December 20, 2017, 9:20pm UTC](https://discuss.elastic.co/t/connecting-to-mssql-on-version-6-1/112721/1 "2017-12-20T21:20:45Z")

</div>

Hello!

I'm trying to use Kibana+Elasticsearch for analytics, BI, in my company project. Here we have our databases on aws but we can acess it thro sql instances. I'm a little lost on how can I use elasticsearch with a sql connection. I've done a lot of research on plugins, but couldn't find a full tutorial that works in the version I'm working with, the 6.1.

Other thing, Can I only pass the connection in the .conf file with a query? In the examples i've seen there the "statement" parameter, is it obrigatory? How does it work? Currently I'm working on this file:

```
@echo off

set DIR=%~dp0
set LIB=%DIR%..\lib\*
set BIN=%DIR%..\bin

REM ???
echo {^
    "type" : "jdbc",^
    "jdbc" : {^
        "url" : "jdbc:URL",^
        "user" : "",^
        "password" : "",^
        "statement" : "",^
        "treat_binary_as_string" : true,^
        "elasticsearch" : {^
             "cluster" : "elasticsearch",^
             "host" : "localhost",^
             "port" : 9300^
        },^
        "index" : "metawiki"^
      }^
}^ | "%JAVA_HOME%\bin\java" -cp "%LIB%" -Dlog4j.configurationFile="%BIN%\log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter"

```

Thank you!

---

<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:** [January 17, 2018, 9:20pm UTC](https://discuss.elastic.co/t/connecting-to-mssql-on-version-6-1/112721/2 "2018-01-17T21:20:48Z")

</div>

Closed on January 17, 2018, 9:20pm UTC

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