Error: Warning 999999: Table schema changed after cursor declared
When setting up a new Utility Network using the Naperville sample data provided by the ArcGIS Solutions team, running the Apply Asset Package geoprocessing tool in ArcGIS Pro while working with a SQL Server database returns the following error:
Error: Warning 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds. Table schema changed after cursor declared [42000:[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Could not complete cursor operation because the table schema changed after the cursor was declared.]
This issue is specific to SQL Server databases, and occurs because of a memory pressure, forcing the Common Language Runtime (CLR) application domain to unload. This is not an issue with the Apply Asset Package tool, Utility Network for ArcGIS, or the ArcGIS Solutions packages.
Solution or Workaround
To circumvent this issue, reduce the size of the maximum server memory for the SQL instance. To do so:
- Launch SQL Server Management Studio.
- Right-click an instance and select Properties in Object Explorer.
- Click Memory in the left pane.
- Set the Maximum server memory to a value between 70% to 80% of available memory on the machine where the SQL Server is installed. Click OK.
- Restart the SQL Server service.
- Rerun the Apply Asset Package tool.
- Utility Network Package Tools: Apply Asset Package
- Problem: ArcGIS clients encounter errors related to table schema changes, app domain unloading, or fetch buffers when working with SQL Server native spatial types