# Sync Elasticsearch with Microsoft SQL

**URL:** <https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977>\
**Category:** Elasticsearch\
**Created:** [February 26, 2020, 8:30am UTC](https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977 "2020-02-26T08:30:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skjoos](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@skjoos](https://discuss.elastic.co/u/skjoos)\
**Post date:** [February 26, 2020, 8:30am UTC](https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977/1 "2020-02-26T08:30:07Z")

</div>

Hello,

Does it exits any service, plugin or something like that to sync Elasticsearch with MSSQL?  
I've tried Logstash, but I don't think it's such a good fit since the database has alot of complicated relationship.

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 26, 2020, 11:17am UTC](https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977/2 "2020-02-26T11:17:06Z")

</div>

I shared most of my thoughts there: [http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/](http://david.pilato.fr/blog/2015/05/09/advanced-search-for-your-legacy-application/)

Basically, I'd recommend modifying the application layer if possible and send data to elasticsearch in the same "transaction" as you are sending your data to the database.

---

<div class="post-metadata">

**Author:** ![skjoos](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@skjoos](https://discuss.elastic.co/u/skjoos)\
**Post date:** [February 27, 2020, 8:53am UTC](https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977/3 "2020-02-27T08:53:15Z")

</div>

I forgot to mention that I don't control the transactions. I'm only building an API for the database that would be synced every minute or so.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 27, 2020, 9:06am UTC](https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977/4 "2020-02-27T09:06:44Z")

</div>

So I guess that Logstash is the best way to handle 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:** [March 26, 2020, 9:06am UTC](https://discuss.elastic.co/t/sync-elasticsearch-with-microsoft-sql/220977/5 "2020-03-26T09:06:46Z")

</div>

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