<small id='0Xzbt'></small><noframes id='0Xzbt'>

  1. <tfoot id='0Xzbt'></tfoot>
    <i id='0Xzbt'><tr id='0Xzbt'><dt id='0Xzbt'><q id='0Xzbt'><span id='0Xzbt'><b id='0Xzbt'><form id='0Xzbt'><ins id='0Xzbt'></ins><ul id='0Xzbt'></ul><sub id='0Xzbt'></sub></form><legend id='0Xzbt'></legend><bdo id='0Xzbt'><pre id='0Xzbt'><center id='0Xzbt'></center></pre></bdo></b><th id='0Xzbt'></th></span></q></dt></tr></i><div id='0Xzbt'><tfoot id='0Xzbt'></tfoot><dl id='0Xzbt'><fieldset id='0Xzbt'></fieldset></dl></div>
      <bdo id='0Xzbt'></bdo><ul id='0Xzbt'></ul>
      <legend id='0Xzbt'><style id='0Xzbt'><dir id='0Xzbt'><q id='0Xzbt'></q></dir></style></legend>

      SQL Server SMO 抱怨缺少 DLL

      时间:2023-11-28

    1. <legend id='vJs9t'><style id='vJs9t'><dir id='vJs9t'><q id='vJs9t'></q></dir></style></legend>
          <tbody id='vJs9t'></tbody>
          <bdo id='vJs9t'></bdo><ul id='vJs9t'></ul>

            <i id='vJs9t'><tr id='vJs9t'><dt id='vJs9t'><q id='vJs9t'><span id='vJs9t'><b id='vJs9t'><form id='vJs9t'><ins id='vJs9t'></ins><ul id='vJs9t'></ul><sub id='vJs9t'></sub></form><legend id='vJs9t'></legend><bdo id='vJs9t'><pre id='vJs9t'><center id='vJs9t'></center></pre></bdo></b><th id='vJs9t'></th></span></q></dt></tr></i><div id='vJs9t'><tfoot id='vJs9t'></tfoot><dl id='vJs9t'><fieldset id='vJs9t'></fieldset></dl></div>
            1. <small id='vJs9t'></small><noframes id='vJs9t'>

              • <tfoot id='vJs9t'></tfoot>
                本文介绍了SQL Server SMO 抱怨缺少 DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                好的,我已经浏览了网络、BOL、各种论坛,但我离答案还很远……希望你们这些好人能伸出援手……

                Ok, I've scoured the web, BOL, various forums and I'm no closer to an answer...hopefully you fine folks can lend a hand...

                我们在网络上有十几个 SQL Server(一些 2k,一些 2005).我在 .NET 应用程序中使用 SMO 对象来获取一些标准信息.我的问题似乎归结为缺少 DLL - Microsoft.SqlServer.BatchParser.dll.但是,此 DLL 没有与其他 SQL DLL 一起提供(Microsoft.SqlServer.ConnectionInfo.dll、Microsoft.SqlServer.Smo.dll、Microsoft.SqlServer.SmoEnum.dll、Microsoft.SqlServer.SqlEnum.dll 等...).我还从 Microsoft 的站点下载了包含 SMO 对象的 SS2005 功能包,但仍然没有成功.

                We've got a dozen or so SQL Servers (some 2k, some 2005) on a network. I'm using SMO objects in a .NET application to get some standard information. My problem appears to boil down to a missing DLL - Microsoft.SqlServer.BatchParser.dll. However, this DLL did not come with the other SQL DLLs (Microsoft.SqlServer.ConnectionInfo.dll, Microsoft.SqlServer.Smo.dll, Microsoft.SqlServer.SmoEnum.dll, Microsoft.SqlServer.SqlEnum.dll, etc...). I also downloaded the SS2005 feature pack from Microsoft's site that includes the SMO objects, but still no luck.

                以下代码有效,除非我取消注释当前注释的行,在这种情况下,我会收到以下错误:

                The following code works, unless I uncomment the line that is currently commented, in which case I get the error below:

                protected void btnArchive_Click(object sender, EventArgs e)
                {
                    ServerConnection conn = new ServerConnection("my_server");
                
                    conn.LoginSecure = false;
                    conn.Login = "my_login";
                    conn.Password = "my_password";
                
                    Server s = new Server(conn);
                    Database d = s.Databases["my_database"];
                    //Table tbl = d.Tables["my_table"];
                
                    Response.Write(s.Name + " " + s.Information.RootDirectory + " " + d.CreateDate.ToShortDateString());
                    conn.Disconnect();
                }
                

                错误:无法加载文件或程序集Microsoft.SqlServer.BatchParser,版本=9.0.242.0,文化=中性,PublicKeyToken=89845dcd8080cc91"或其依赖项之一.系统找不到指定的文件.

                Error: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

                注意,我也使用 VB.NET 从 SSIS 尝试过这个,同样的行为.

                Note, I've also tried this from SSIS using VB.NET, same behavior.

                如有任何想法,我们将不胜感激.

                Any thoughts would be appreciated.

                谢谢.

                推荐答案

                我能够使用 10.* 版本的程序集Microsoft.SqlServer.ConnectionInfo"、Microsoft.SqlServer.Management.Sdk"成功运行您的代码.Sfc"和Microsoft.SqlServer.Smo".尝试下载 2008 版 SMO 组件,也许这是一个他们现在已经修复的错误.

                I was able to successfully run your code using the 10.* versions of the assemblies "Microsoft.SqlServer.ConnectionInfo", "Microsoft.SqlServer.Management.Sdk.Sfc" and "Microsoft.SqlServer.Smo". Try downloading the 2008 version of the SMO components, maybe it was a bug that they've now fixed.

                这篇关于SQL Server SMO 抱怨缺少 DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何在数据库中保存谷歌地图叠加形状? 下一篇:向 SQL Server Reporting Services 报告添加交替行颜色

                相关文章

              • <small id='2hFd5'></small><noframes id='2hFd5'>

              • <tfoot id='2hFd5'></tfoot>
                  <legend id='2hFd5'><style id='2hFd5'><dir id='2hFd5'><q id='2hFd5'></q></dir></style></legend>

                      <bdo id='2hFd5'></bdo><ul id='2hFd5'></ul>
                    <i id='2hFd5'><tr id='2hFd5'><dt id='2hFd5'><q id='2hFd5'><span id='2hFd5'><b id='2hFd5'><form id='2hFd5'><ins id='2hFd5'></ins><ul id='2hFd5'></ul><sub id='2hFd5'></sub></form><legend id='2hFd5'></legend><bdo id='2hFd5'><pre id='2hFd5'><center id='2hFd5'></center></pre></bdo></b><th id='2hFd5'></th></span></q></dt></tr></i><div id='2hFd5'><tfoot id='2hFd5'></tfoot><dl id='2hFd5'><fieldset id='2hFd5'></fieldset></dl></div>