Home Forums Programming XML Failed to load msxmlsql.dll RE: Failed to load msxmlsql.dll

  • I had a similar problem but with an x64 SQL Server 2008 R2 Developer edition.

    I post the workaround here for those who may be in the same situation.

    Some other product installed an x64 SQL Server 2008 Express beside my 2008R2Dev instance and all xml procedure stop to work with the same message quoted upper.

    The workaround. I copied two files from the installation DVD to my disk.

    Stop the SQL instance

    From the DVD : \1033_ENU_LP\x64\Setup\sql_engine_core_shared_loc_msi\PFiles\SqlServr\100\Shared\Res\1033\msxmlsql.rll

    To : \Program Files\Microsoft SQL Server\100\Shared\Resources\1033

    From the DVD: \x64\Setup\sql_engine_core_shared_msi\PFiles\SqlServr\100\Shared\msxmlsql.ddl

    To : \Program Files\Microsoft SQL Server\100\Shared

    Start the instance.

    Test with a statement like this one:

    DECLARE @docHandle INT

    DECLARE @error INT

    EXEC sp_xml_preparedocument @docHandle OUTPUT, N'<root><child/></root>'

    SET @error =@@ERROR

    IF @error =0

    BEGIN

    EXEC sp_xml_removedocument @docHandle

    END

    And... OK : Command(s) completed successfully.

    Hope it will help