SQL Server Performance

Failed to load msxmlsql.dll.

Discussion in 'General DBA Questions' started by sramesh, Jun 21, 2007.

  1. sramesh New Member

    Hi All,
    I have executed the below simple xml script.

    I got the below error while executing the script
    Server: Msg 6610, Level 16, State 1, Procedure sp_xml_preparedocument, Line 18
    Failed to load msxmlsql.dll.

    I have also tried microsoft recommendation. but still i am facing same problem.

    Refhttp://support.microsoft.com/kb/918767/en-us
    I am follwed method 2.

    Please help. Is reboot the server will resolve the problem?

    The script
    DECLARE @hdoc int
    DECLARE @doc varchar(1000)
    SET @doc ='
    <ROOT>
    <Customer CustomerID="VINET" ContactName="Paul Henriot">
    <Order CustomerID="VINET" EmployeeID="5" OrderDate="1996-07-04T00:00:00">
    <OrderDetail OrderID="10248" ProductID="11" Quantity="12"/>
    <OrderDetail OrderID="10248" ProductID="42" Quantity="10"/>
    </Order>
    </Customer>
    <Customer CustomerID="LILAS" ContactName="Carlos Gonzlez">
    <Order CustomerID="LILAS" EmployeeID="3" OrderDate="1996-08-16T00:00:00">
    <OrderDetail OrderID="10283" ProductID="72" Quantity="3"/>
    </Order>
    </Customer>
    </ROOT>'
    --Create an internal representation of the XML document.
    EXEC sp_xml_preparedocument @hdoc OUTPUT, @doc

    SELECT CustomerID, ContactName
    FROM OPENXML ( @hdoc, '/ROOT/Customer', 1)
    WITH ( CustomerID VARCHAR(40) '@CustomerID',
    ContactName VARCHAR(40) '@ContactName'
    )

    SELECT CustomerID, ContactName
    FROM OPENXML ( @hdoc, '/ROOT/', 1)
    WITH ( CustomerID VARCHAR(40) ,
    ContactName VARCHAR(40)
    )
    -- Remove the internal representation.
    exec sp_xml_removedocument @hdoc



    Thanks
    S. Ramesh
  2. satya Moderator

Share This Page