none
Error "Failed to load Msxmlsql.dll" on SQL2008Express and SQL2008R2 Developer

    問題

  • Hi,

    out of a sudden I get the following error message if I try to execute the "sp_xml_preparedocument" stored procedure.
    Msg 6610, Level 16, State 1, Procedure sp_xml_preparedocument, Line 1
    Failed to load Msxmlsql.dll

    I found enough information about this problem on servers running SQL2005 on WinServer 2000 or 2003, but I run 2 servers MS SQL 2008 Express with Advanced Featuers (installed as a default instance) and MS SQL 2008 R2 Developer Edition on the same machine Windows 2008 SP2.

    I am pretty sure that the problem appeared about 1 week ago, for I did not have any problems with XML on both servers until now.

    The both server report the same problem. Their "Shared" folders both contain the file.

    In one forum I found the information the new installation of SharePoint WSS can help, but I re-installed them twice with no effect.

    Some ideas?

    With best regards,

    Alexander.


    Never stop asking!
    2010年10月5日 下午 01:01

所有回覆

  • Hi,

    From your description, SQL Server 2008 Express and SQL Server 2008 R2 developer are one the same machine and msxmlsql.dll exists in the "%ProgramFiles%\Microsoft SQL Server\100\Shared" folder, right?

    Could you please try re-installing MSXML 6.0 SP1 on your machine to see if it works? You can download from:

    Microsoft Core XML Services (MSXML) 6.0 Service Pack 1
    http://www.microsoft.com/downloads/en/details.aspx?FamilyId=d21c292c-368b-4ce1-9dab-3e9827b70604&displaylang=en


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    2010年10月7日 上午 03:05
  • From your description, SQL Server 2008 Express and SQL Server 2008 R2 developer are one the same machine and msxmlsql.dll exists in the "%ProgramFiles%\Microsoft SQL Server\100\Shared" folder, right?

    Could you please try re-installing MSXML 6.0 SP1 on your machine to see if it works? You can download from:

    Microsoft Core XML Services (MSXML) 6.0 Service Pack 1
    http://www.microsoft.com/downloads/en/details.aspx?FamilyId=d21c292c-368b-4ce1-9dab-3e9827b70604&displaylang=en

    Hi,

    thank you for your suggestion.

    Yes, the both installation are on the same machine and the file exists in both "90" and "100" installation folders.

    I took the German version of the Service Pack to match the Server's locale but it didn't help.

    I get the same error.

    Alexander.


    Never stop asking!
    2010年10月7日 上午 07:11
  • Alexander,

    I recommend that you run Process Monitor to monitor your SQL Server process when you execute the stored procedure. You may first restart your SQL Server instance, then start running Process Monitor with the filter "[Path] [contains] [msxmlsql]", open SQL Server Management Studio, connect to your database and execute your query again. Then stop capturing the trace and check the result and Detail columns to see if there are any access issue.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    2010年10月13日 上午 11:50
    版主
  • We had the same issue but none of the above hints could help.

    Situation:

    1. SQL Server 2008 Express with Advanced Services was installed on a Windows 2008 box.
    2. TFS 2010 installed, everything works fine
    3. SQL Server 2008 R2 Developer installed -> TFS 2010 and WSUS stopps working with the same message as above

    Downgrade vom SQL Server 2008 R2 to SQL Server 2008 did not help. Nor did reinstall of the Express instance.

    Solution:

    I suspected the Program Files\Microsoft SQL Server\100\Shared\msxmlsql.dll having been upgraded by the R2-installation to cause the problems. So I made a backup of it and replaced it from the msxmlsql.dll from the 90\Shared folder. It immediately worked, without  registering or anything.

    2011年2月8日 下午 01:09
  • 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 work around. 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

    2011年6月16日 下午 04:20
  • I had the same problem and none of above helped.

    However ProcesMonitor showed me one interested thing.  Sql Server looks for msxmlsql.dll also in Program Files\Microsoft SQL Server\MSSQL10.MSSQL\MSSQL\Binn folder. Copying msxmlsql.dll there solved all my problems.

    Hope this small addition will help someone!

     

    Notice:

    Your actual folder may be different then MSSQL10.MSSQL. ProcesMonitor utilit will show you where sql server looks for files.


    Jedem Das Seine
    2012年1月17日 上午 11:06
  • I had the same issue with the msxmlsql.rll file. After adding functionnalities to a SQL Server 2008 R2 installation, these RLL files had been updated with new version. Like you, after replacing with the RLL from 100\Shared, everything works like a charm
    2012年7月20日 上午 08:31