Error: ExecuteScalar Requires an Open and Available Connection During Entra ID Collection
Symptom
Entra ID collection fails after scanning. The process appears to reach the Adding domain stage before hanging, and then the following error appears:
ExecuteScalar requires an open and available Connection. The connection's current state is closed.
Cause
This issue is typically caused by a conflict in the SQL data, most likely due to a failed scan.
Resolution
-
Open the database in SQL Server Management Studio.
-
Click View and open Object Explorer Details.
NOTE: This allows you to run the delete operation multiple times in the following steps until all tables are removed. This is necessary due to constraints within the tables.
-
Filter tables by the
Namevalue of AAD. -
Review all tables listed. You can select and delete all of them.
-
Update the filter to the
Namevalue of AzureADInventory. -
Repeat step 4. You should see the tables and be able to delete them.
-
Return to the Netwrix Access Analyzer console and rerun the .Entra ID Inventory job group.