SQL Server 装载 msxmlsql.dll 失败的解决办法
錯(cuò)誤信息:裝載 msxmlsql.dll 失敗(Failed to load Msxmlsql.dll)。
環(huán)境:ASP.NET2.0? SQL Server 2000(SP4)。
出錯(cuò)原因:存儲(chǔ)過程中調(diào)用了擴(kuò)展存儲(chǔ)過程sp_xml_preparedocument來處理XML數(shù)據(jù),但沒有找到支持sp_xml_preparedocument運(yùn)行的msxmlsql.dll文件。
問題分析:
首先看到msxml版本已經(jīng)是最新的sp2版,這個(gè)應(yīng)該沒有問題。
其次去安裝SQL Server的位置找msxmlsql名的文件,沒有找到。
再去C:\Program Files\Microsoft SQL Server\下查找,找到了若干個(gè)以msxmlsql為名的文件:
后 面發(fā)現(xiàn)了下面篇英文文章才真正找到了原因,原因是安裝SQL Server時(shí)沒有安裝到默認(rèn)的目錄(即%Program Files%\Microsoft SQL Server\),而SQL Server找msxmlsql.dll時(shí)就卻到安裝目錄下找,于是出錯(cuò)了。
解決辦法:將%Program Files%\Microsoft SQL Server\下的那幾個(gè)msxmlsql文件拷到(保持目錄結(jié)構(gòu)不變)你的安裝目錄下,重啟SQL Server服務(wù)。一切正常。
附上原文:
As part of our improvements on OpenXML, we have changed the MSXML component from 2.6 to 3.0 (running in 2.6 backwards-compatibility mode) and moved to a private DLL (called MSXMLSQL.DLL) in order to avoid the reboot requirement when installing SQL Server 2005. This change has been released the first time in the April CTP and will also be included in SQL Server 2000 SP4 (yeah!).
A couple of positives are that the parser will scale linear to the size of the document (there were cases when MSXML 2.6 was superlinear, ugh!), and the parent axis access in column pattern expressions will be finally performing (compared to the 2.6 based engine, it should be lightning fast :-)).
However, the April CTP seems to have an installation bug, if one decides to install the database engine (SQL Server 2005 April CTP that is) in a different location than the default (so is it still a non-breaking change? :-)).
MSXMLSQL.dll and .rll are installed to the same location as tools which is a configurable path. The default install location is:
%Program Files%\Microsoft SQL Server\90\Shared
However, if INSTALLSQLSHAREDDIR is provided on the command line or set during GUI setup MSXMLSQL will be installed to:
%INSTALLSQLSHAREDDIR%\90\Shared
Since the code only looks in the first location, it will not find it. So, if you encounter the above error message, please just copy the missing files from %INSTALLSQLSHAREDDIR%\90\Shared to %Program Files%\Microsoft SQL Server\90\Shared. We are working to get this fixed for the next CTP release (and of course make sure it does not occur in SP4 either).
If you install everying using default location, this is not an issue.
(http://www.sqljunkies.com/WebLog/mrys/archive/2005/04/22/12478.aspx)
總結(jié)
以上是生活随笔為你收集整理的SQL Server 装载 msxmlsql.dll 失败的解决办法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [MySQL FAQ]系列 -- mys
- 下一篇: 深沉和希望