我是否需要安装Sql Server CE?

时间:2011-05-31 18:01:08

标签: sql-server-ce

我在托管服务器上部署了一个应用程序(wcf REST服务),我遇到的问题是我想在应用程序中使用SQL Server Compact Edition。我知道sqlce可能不适合与wcf服务一起使用,但它是一个POC应用程序,所以现在我想使用轻量级的东西。

我的假设是,只要我包含所有相关的dll,就不必安装任何东西来使sqlce正常工作。要么这个假设是错误的,要么我做错了什么,要么我非常感谢你的帮助。

更多细节:

  • 我在bin中包含所有本机dll 文件夹(sqlceme35.dll,sqlceca35.dll, sqlcecompact35.dll等...)。
  • 当我从Visual Studio
  • 本地运行服务时,一切正常
  • 本地计算机是Windows7 64位,无法运行的部署服务器是Windows Web Server 2008 R2 64位

我已在本地和服务器上的服务上运行procmon.exe。我注意到我的服务在注册表中查找本机程序集的路径。在我的本地机器上它找到它们,在远程机器上,它似乎找不到它们。即使我已将它们包含在bin文件夹中。看看procmon跟踪,看起来它似乎永远不会在程序集文件夹中查找程序集,为什么会这样?有几个教程指示您将这些本机dll放在bin文件夹中,但是如何让运行时从那里获取它们?

由于

编辑: 这是我得到的异常消息:

Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

这是堆栈跟踪,如果有很多帮助,请不要知道:

System.Data.SqlServerCe.NativeMethods.GetSqlCeVersionInfo(IntPtr& pwszVersion)
System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath, Int32 moduleVersion)
System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()

这是来自procmon的跟踪,因为你可以看到它永远不会在本地bin文件夹中查找,而所有其他尝试都会导致“NOT FOUND”

19:38:19,6827870    w3wp.exe    1492    RegOpenKey  HKLM\Software\Microsoft\Microsoft SQL Server Compact Edition\v3.5   NAME NOT FOUND  Desired Access: Read
19:38:19,6830056    w3wp.exe    1492    CreateFile  C:\Windows\System32\inetsrv\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6831212    w3wp.exe    1492    CreateFile  C:\windows\system32\inetsrv\AMD64\sqlceme35.dll PATH NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6833148    w3wp.exe    1492    CreateFile  C:\Windows\System32\inetsrv\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6834744    w3wp.exe    1492    CreateFile  C:\Windows\System32\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6837095    w3wp.exe    1492    CreateFile  C:\Windows\system\sqlceme35.dll NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6838472    w3wp.exe    1492    CreateFile  C:\Windows\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6901250    w3wp.exe    1492    CreateFile  C:\Windows\System32\inetsrv\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6908696    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Mail Enable\bin\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6911172    w3wp.exe    1492    CreateFile  C:\Windows\System32\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6913672    w3wp.exe    1492    CreateFile  C:\Windows\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6917576    w3wp.exe    1492    CreateFile  C:\Windows\System32\wbem\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6922974    w3wp.exe    1492    CreateFile  C:\Windows\System32\WindowsPowerShell\v1.0\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6924935    w3wp.exe    1492    CreateFile  C:\PROGRA~2\MAILEN~1\BIN64\sqlceme35.dll    PATH NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6929665    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6941248    w3wp.exe    1492    CreateFile  C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6949102    w3wp.exe    1492    CreateFile  C:\Program Files\Microsoft SQL Server\100\DTS\Binn\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6957462    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6961266    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6965371    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6968111    w3wp.exe    1492    CreateFile  C:\Windows\assembly\GAC_MSIL\System.Data.SqlServerCe\3.5.1.0__89845dcd8080cc91\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6970427    w3wp.exe    1492    CreateFile  C:\Windows\System32\inetsrv\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6972318    w3wp.exe    1492    CreateFile  C:\Windows\System32\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6974908    w3wp.exe    1492    CreateFile  C:\Windows\system\sqlceme35.dll NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6976650    w3wp.exe    1492    CreateFile  C:\Windows\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6978616    w3wp.exe    1492    CreateFile  C:\Windows\System32\inetsrv\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6983399    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Mail Enable\bin\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6985731    w3wp.exe    1492    CreateFile  C:\Windows\System32\sqlceme35.dll   NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6987678    w3wp.exe    1492    CreateFile  C:\Windows\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6990224    w3wp.exe    1492    CreateFile  C:\Windows\System32\wbem\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6993088    w3wp.exe    1492    CreateFile  C:\Windows\System32\WindowsPowerShell\v1.0\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,6994236    w3wp.exe    1492    CreateFile  C:\PROGRA~2\MAILEN~1\BIN64\sqlceme35.dll    PATH NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,7000169    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,7006810    w3wp.exe    1492    CreateFile  C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,7014391    w3wp.exe    1492    CreateFile  C:\Program Files\Microsoft SQL Server\100\DTS\Binn\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,7025657    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\sqlceme35.dll    NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,7034545    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
19:38:19,7040690    w3wp.exe    1492    CreateFile  C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\sqlceme35.dll  NAME NOT FOUND  Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

1 个答案:

答案 0 :(得分:1)