Here’s the current list of Schema Versions for Active Directory on Windows Server.
|Windows 2000 Server
|Windows Server 2003
|Windows Server 2003 R2
|Windows Server 2008
|Windows Server 2008 R2
|Windows Server 2012
|Windows Server 2012 R2
|Windows Server 2016
You can validate the current schema version you have in your environment via PowerShell or Registry Editor.
Validate schema version via PowerShell:
Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion
In this screenshot, I have ObjectVersion equal to 69, denoting the schema has been extended for AD on Windows Server 2012 R2.
Validate schema version via Registry Editor:
- Click Start and search for
- Open up regedit and navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters
- In this screenshot, I have Schema Version equal to 69, denoting the schema has been extended for AD on Windows Server 2012 R2.
Symptom: You receive the following error when trying to drop an orphaned user from a msSQL database.
The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15421)
Solution: Follow the steps below:
- Open up Microsoft SQL Server Management Studio
- Start->All Programs->Microsoft SQL Server 2008 R2->SQL Server Management Studio
- Navigate to the database that you cannot drop the user from.
- Expand the Security section inside of the database
- Expand the Users section and right click on the user and rename it (to something other than the new user… assuming you are trying to use a new login with the same username)
- Expand the Roles section underneeth the Security section
- Expand the Database Roles section
- For each Database Role, Right click->Properties on a role and ensure the Owner attribute is set to the new account you wish to use
- Once you have removed all references to the orphaned account inside of the Owner attributes, you should be able to remove the user from the database.