# Active Directory Domain Services could not replicate the directory partition – The replication operation encountered a database error

If you ever encounter an error while trying to create a new domain within a forest saying, “The replication operation encountered a database error,” it makes you sweat a bit. Your brain tells you it will be a nightmare to fix, do I have proper backups to make it happen, and the question “why now” shows up.

blog

28 Nov 2021 pl

![Active Directory Domain Services could not replicate the directory partition – The replication operation encountered a database error](/wp-content/uploads/2021/11/img_61960f0a906f5.png)

[Zobacz obrazy (4)](#pf-content-image-1-0)

If you ever encounter an error while trying to create a new domain within a forest saying, “The replication operation encountered a database error,” it makes you sweat a bit. Your brain tells you it will be a nightmare to fix, do I have proper backups to make it happen, and the question “why now” shows up.

[!\[PowerShell Install-ADDSDomain error showing replication operation encountered a database error\](/wp-content/uploads/2021/11/img_61960d59e071a.png)](/wp-content/uploads/2021/11/img_61960d59e071a.png)

### 💡 How to find out what's wrong?

Of course, one should not panic and try to check what's wrong. In those cases, I usually run [Testimo](https://github.com/EvotecIT/Testimo) to quickly check relevant tests. While [Testimo](https://github.com/EvotecIT/Testimo) has more than 70 tests that can help you secure your environment it also is great for debugging or doing quick checks. It can save you a lot of time than trying to go thru your environment manually.

```powershell
invoke-testimo -Sources DCDFS, DCServices, ForestReplication,DCDiagnostics, DomainLDAP
```

[!\[Testimo forest replication report showing multiple DC replication failures\](/wp-content/uploads/2021/11/img_61960ee829b83.png)](/wp-content/uploads/2021/11/img_61960ee829b83.png)[!\[Testimo LDAP and domain controller service checks with DFS warnings\](/wp-content/uploads/2021/11/img_61960f0a906f5.png)](/wp-content/uploads/2021/11/img_61960f0a906f5.png)[!\[Testimo SYSVOL DFS and DCDIAG results for the affected domain controller\](/wp-content/uploads/2021/11/img_61960f6d64568.png)](/wp-content/uploads/2021/11/img_61960f6d64568.png)

Within a few minutes, I got a full report that everything is mostly ok. Sure there are some small problems, but generally, replication works, services are up and running, **dcdiag** doesn't report anything major, and **SYSVOL/DFS** is mostly ok. In addition, I check some event logs, but nothing really stands out.

### 💡 How to solve – Could not replicate directory partition?

Having everything shown as green is great, but still, the issue was there and I couldn't add a new **Domain** to a **Forest**. Then it hit me – what is the current patch level of this machine. There it was **November 2021** patch installed. The system is up to date, but actually, as you should already be aware that **Cummulative Update** has a single flaw, where it breaks **Kerberos** so if the patch is applied to **Domain Controller** it requires another update to be installed.

- 💡 [November 9, 2021—KB5007206 (OS Build 17763.2300)](https://support.microsoft.com/en-us/topic/november-9-2021-kb5007206-os-build-17763-2300-c63b76fa-a9b4-4685-b17c-7d866bb50e48)
- 💡 [November 14, 2021—KB5008602(OS Build 17763.2305) Out-of-band](https://support.microsoft.com/en-us/topic/november-14-2021-kb5008602-os-build-17763-2305-out-of-band-8583a8a3-ebed-4829-b285-356fb5aaacd7)

While the patch notes don't mention anything related to DB corruption or about blocking the ability to add a new **Active Directory Domain** to a forest, it seems that **November 2021** Windows patches also impact this functionality and can give you a heart attack in the process while doing this on production so if you have Active Directory Database Error make sure to verify your patching level.

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:728FA4B9F846F9DA0AF29EDA6281E0F3F7E0886C704D789BA0ABB5D4FB250AE8 -->
