# Ingest SQL Server data on another server through logstash

**URL:** <https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697>\
**Category:** Elasticsearch\
**Created:** [June 18, 2020, 7:30pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697 "2020-06-18T19:30:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FernandoMOTA](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@FernandoMOTA](https://discuss.elastic.co/u/FernandoMOTA)\
**Post date:** [June 18, 2020, 7:30pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697/1 "2020-06-18T19:30:32Z")

</div>

I want to send data from my DB Sql server to ES, the database is on another server, only the local host I received

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [June 18, 2020, 9:05pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697/2 "2020-06-18T21:05:56Z")

</div>

You can connect to external servers with Logstash to ingest data. Not sure if that was your question.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [June 18, 2020, 9:12pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697/3 "2020-06-18T21:12:31Z")

</div>

I use jdbc to connect to sql server on windows machine and pull the data to ES

---

<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:** [June 18, 2020, 9:18pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697/4 "2020-06-18T21:18:16Z")

</div>

Not exactly the answer but I thought it'd be worth sharing.

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.

Have also a look at this ["live coding" recording](https://www.elastic.co/fr/blog/how-to-add-powerful-search-existing-sql-applications-elasticsearch-video-tutorial).

---

<div class="post-metadata">

**Author:** ![FernandoMOTA](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@FernandoMOTA](https://discuss.elastic.co/u/FernandoMOTA)\
**Post date:** [June 18, 2020, 11:12pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697/5 "2020-06-18T23:12:26Z")

</div>

I managed to ingest but I have a question that is if I can ingest the whole bank without having to make a query bringing all the tables I want

---

<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:** [July 16, 2020, 11:12pm UTC](https://discuss.elastic.co/t/ingest-sql-server-data-on-another-server-through-logstash/237697/6 "2020-07-16T23:12:26Z")

</div>

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