# OrientDB Database health check failed with database integrity: BROKEN

**URL:** <https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621>\
**Category:** Sonatype Nexus Repository\
**Tags:** help, nexus-repository, orientdb, nexus-migration\
**Created:** [October 9, 2024, 1:22pm UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621 "2024-10-09T13:22:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakshumjain](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sakshumjain](https://community.sonatype.com/u/sakshumjain)\
**Post date:** [October 9, 2024, 1:22pm UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/1 "2024-10-09T13:22:19Z")

</div>

Hello,

We are trying to upgrade the Sonatype Nexus Repository OSS 3.70.2 database from OrientDb to H2. We ran the health check on the back up taken from OrientDb using admin task and got below error:

12:54:52 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Check of storage completed in 234660ms. without errors.  
12:54:52 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Checking db cluster consistency for errors…  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Check storage: OK  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Check clusters consistency: OK  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - 0 component duplicates found  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - 1 asset duplicates found  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - 0 browse nodes duplicates found  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - ------------------------------------------------------------  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Database integrity: BROKEN  
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - ------------------------------------------------------------

how to find the issue and fix it before doing the migration ? Please let us know

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [October 9, 2024, 4:34pm UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/2 "2024-10-09T16:34:57Z")

</div>

You’ll need to manually connect to the database using an OrientDB console tool. I’m not sure these instructions are up to date as I believe the console may no longer be distributed - [https://support.sonatype.com/hc/en-us/articles/115002930827-Accessing-the-OrientDB-Console](https://support.sonatype.com/hc/en-us/articles/115002930827-Accessing-the-OrientDB-Console)

The error message is saying that in the assets table there are multiple assets in the same repository with the same path.

---

<div class="post-metadata">

**Author:** ![sakshumjain](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sakshumjain](https://community.sonatype.com/u/sakshumjain)\
**Post date:** [October 10, 2024, 9:50am UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/3 "2024-10-10T09:50:22Z")

</div>

@mpiggott thank you for your response. I am not able to connect to database. do you know how can I login at h2 database and check for this duplicates ?

---

<div class="post-metadata">

**Author:** ![sakshumjain](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sakshumjain](https://community.sonatype.com/u/sakshumjain)\
**Post date:** [October 16, 2024, 9:57am UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/4 "2024-10-16T09:57:29Z")

</div>

@ldurant I am wandering if you can help with instructions for login at H2 database?  
Thank You in advance!

---

<div class="post-metadata">

**Author:** ![ldurant](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/ldurant/32/2083_2.png) [@ldurant](https://community.sonatype.com/u/ldurant)\
**Post date:** [October 17, 2024, 4:41pm UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/5 "2024-10-17T16:41:23Z")

</div>

@sakshumjain It appears you need to do the login for your existing OrientDB database, not H2 since your instance is still using OrientDB and have not migrated to H2 yet. Are you saying you cannot connect to the OrientDB database?

---

<div class="post-metadata">

**Author:** ![sakshumjain](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sakshumjain](https://community.sonatype.com/u/sakshumjain)\
**Post date:** [October 21, 2024, 2:42pm UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/6 "2024-10-21T14:42:03Z")

</div>

Hi @ldurant ,

Yes our production is still on orient db it will be good if we manage to delete the duplicates in this only and then migrate but i was trying on lower environments and there i upgraded to h2 so wanted to know how i can access h2 and delete duplicates .

As per the logs it has skipped only 1 record and in health checkup it displayed one duplicate. does it mean it has skip that ?

Also i can see on the results it has filtered some data as per the below entry:

53411 records were filtered

where can i found what is filtered and why ?

Looking forward for your response!

---

<div class="post-metadata">

**Author:** ![sakshumjain](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@sakshumjain](https://community.sonatype.com/u/sakshumjain)\
**Post date:** [October 28, 2024, 11:29am UTC](https://community.sonatype.com/t/orientdb-database-health-check-failed-with-database-integrity-broken/13621/7 "2024-10-28T11:29:43Z")

</div>

@ldurant awaiting your response this will help us to resolve the bottle neck. Please respond
