Search code examples
sql-serverwindows-serviceswindows-server-2012sql-agent-jobssis-2014

Error 0xC0011008 the package failed to load


I'm facing a strange behavior of SQL Server Agent when executing SSIS packages.

I have a job that includes many steps (mainly SSIS packages). Some steps fail mostly every day even the configuration is the same for all the steps.

I tried to delete/create the job, delete/create the SQL Server Agent Proxy but with no sucess.

I can't find any difference between the steps that fail and the ones that succeed.

This is the error returned by SQL Server Agent :

The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information

SQL Server version : 2014

SSIS version : 2014

EDIT :

In the Event Log I found an Information Message from User Profile Service that says :

Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards

Process 5924 (\Device\HarddiskVolume2\Program Files\Microsoft SQL Server\120\DTS\Binn\DTExec.exe) has opened key \REGISTRY\USER\S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX\Control Panel\International

Process 5924 (\Device\HarddiskVolume2\Program Files\Microsoft SQL Server\120\DTS\Binn\DTExec.exe) has opened key \REGISTRY\USER\S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX\Software\Microsoft\Windows\CurrentVersion

The SID corresponds to the Proxy User used to execute the SQL Job steps. And the timestamp corresponds is the same when the error occures in SQL Agent.

I think this is what causes the steps to fail.

Could we prevent Windows unloading this registry ?


Solution

  • The error was indeed caused by the fact that the User Profile Service forces the unloading of the Registry.

    The solution that worked for me was to change the policy setting Do not forcefully unload the user registry at user logoff from "Not Configured" to Enabled.

    1. Start the Local Group Policy Editor (gpedit.msc)

    2. Go to Computer Configuration > Administrative Templates > System > User Profiles

    3. Set "Do not forcefully unload the user registry at user logoff" to Enabled

    4. Run gpupdate command.

    Details can be found here : https://support.microsoft.com/en-us/help/2287297/a-com-application-may-stop-working-on-windows-server-2008-when-a-user