# Getting data from lagging database

**URL:** <https://discuss.elastic.co/t/getting-data-from-lagging-database/321244>\
**Category:** Logstash\
**Created:** [December 14, 2022, 9:46pm UTC](https://discuss.elastic.co/t/getting-data-from-lagging-database/321244 "2022-12-14T21:46:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raunakraje](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@raunakraje](https://discuss.elastic.co/u/raunakraje)\
**Post date:** [December 14, 2022, 9:46pm UTC](https://discuss.elastic.co/t/getting-data-from-lagging-database/321244/1 "2022-12-14T21:46:51Z")

</div>

Hi Guys,  
I have 2 MSSQL databases a Production db(A) and a Backup db (B). Data from Production DB gets updated in Backup DB with a lag of 15 mins. I am trying to get data from Backup DB but due to this lag I am unable to get proper data. There is always a bit of data loss.

Tried querying with tracking column, sql\_last\_value but still same results.

Can someone please suggest a way to compensate this lag or a better way to solve this issue.

\*cant take data directly from prod db as locking occurs on the table.

Thanks.

---

<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 11, 2023, 9:47pm UTC](https://discuss.elastic.co/t/getting-data-from-lagging-database/321244/2 "2023-01-11T21:47:21Z")

</div>

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