# How to migrate data from db oracle to ES use Logstash?

**URL:** <https://discuss.elastic.co/t/how-to-migrate-data-from-db-oracle-to-es-use-logstash/285248>\
**Category:** Elasticsearch\
**Created:** [September 27, 2021, 3:28pm UTC](https://discuss.elastic.co/t/how-to-migrate-data-from-db-oracle-to-es-use-logstash/285248 "2021-09-27T15:28:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NinhNM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ninhnm/32/86797_2.png) [@NinhNM](https://discuss.elastic.co/u/NinhNM)\
**Post date:** [September 27, 2021, 3:28pm UTC](https://discuss.elastic.co/t/how-to-migrate-data-from-db-oracle-to-es-use-logstash/285248/1 "2021-09-27T15:28:55Z")

</div>

I have around 1 millions record in db oracle and I want migrate to ES.  
Logstash:

```auto
input {
  jdbc {
    jdbc_driver_library => "/Users/ninhnguyen/Desktop/ojdbc7.jar"
    jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
    jdbc_connection_string => "jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.152.10.89)(PORT = 1500))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = VNCC)))"
    jdbc_user => "USERSTORE"
    jdbc_password => "123"
    schedule => "*/1 * * * * *"
    statement => "select * from ind_view"
  }
}

output {
elasticsearch {
      hosts => ["10.159.27.117:30007"]
      index => "vnconnect_umuser"
      document_type => "vnconnect_umuser"
      document_id => "%{um_id}"
  }
}

```

After run bin/logstash -f sql.conf and I have check with post man response always return hits total = 10000

 ![Screen Shot 2021-09-27 at 22.26.01](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c8374e2951a6854a15eae9c04d866d76be6cb6ec.png)

I don't know migrated all 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:** [September 27, 2021, 4:37pm UTC](https://discuss.elastic.co/t/how-to-migrate-data-from-db-oracle-to-es-use-logstash/285248/2 "2021-09-27T16:37:28Z")

</div>

The answer is telling you that you have more than 10000 hits (gte 10000).

If you want the exact number read this page: [Search your data | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-your-data.html#track-total-hits)

---

<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:** [October 25, 2021, 4:38pm UTC](https://discuss.elastic.co/t/how-to-migrate-data-from-db-oracle-to-es-use-logstash/285248/3 "2021-10-25T16:38:14Z")

</div>

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