.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Problems with SMO 2008 Redist + Microsoft.SqlServer.BatchParserClient

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :Sql Server
Hi,    I'm trying to run my application using SMO 2008. Everything works just fine if i have sql 2008 server installed.   My problem starts when I try to use SMO 2008 Redist. First it does not install Microsoft.SqlServer.BatchParserClient or Microsoft.SqlServer.BatchParser. After a little research, I found that this is a problem and that these files have to be copied manually to the folder where the application runs.  So I tried copying the files: No luck, i get a Could not load file (Below).  Then i tried to adding these files to the GAC manually: Same thing, Could not load file:   Code Snippet Microsoft.SqlServer.Management.Smo.FailedOperationException: ExecuteNonQuery failed for Database 'DB2008'.  ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)        Then I looked at the version of the files and they seemed to be version, so I went to my app.config and added a bind redirection from to now it finds the assembly but says that Manifest doesnt mach the reference:   Code SnippetMicrosoft.SqlServer.Management.Sm

View Complete Post

More Related Resource Links

Microsoft.SqlServer.BatchParserClient, Version= -- Again it seems

Ok I created a project and installer, the project uses the SMO assemblies.  On my system and all my test seems it installs and works fine.  After installing on other system I am starting to get error reports because "Microsoft.SqlServer.BatchParserClient, Version=" is not installed on the system.  I have been doing some digging and found the below link but that only seems to help after the fact.  I need to include the correct assemblies in my installer.  Currently the package include the list below which does not include the problem file.  I tried installing SP3 on SQL 2005 but that does not seem to have helped.  What is the correct way of getting this assembly installed on the client server.  I am not happy with giving everyone the below link.http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=228de03f-3b5a-428a-923f-58a033d316e1 Packaging file 'Microsoft.ReportViewer.Common.dll'... Packaging file 'Microsoft.ReportViewer.WinForms.dll'... Packaging file 'Microsoft.SqlServer.ServiceBrokerEnum.dll'... Packaging file 'WPFToolkit.dll'... Packaging file 'Microsoft.SqlServer.SqlClrProvider.dll'... Packaging file 'Microsoft.SqlServer.SqlEnum.dll'... Packaging file 'Microsoft.ReportViewer.ProcessingObjectModel.dll'... Packaging file 'Microsoft.SqlServer.ConnectionInfo.dll'... Packaging fil

Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient'



I've seen several posts on this forum about this issue, and several have been resolved, but I'm not seeing the answer.

On my Windows 7 machine with SQL Server 2008 R2, I have a Visual Studio 2010 project that uses SQL SMO.

The app runs fine on my machine, but when I publish to another server, I get Could not load file or assembly 'Microsoft.SqlServer.BatchParserClient'

If I go to http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

and install Microsoft SQL Server 2008 Native Client , Microsoft SQL Server System CLR Types , and Microsoft SQL Server 2008 Management Objects I stop getting the error.

It seems to me that I should just be able to properly reference what I need and deploy my project...

So- how do I deploy my project without needing these installs?


In His service,
Steve Gray MCDBA
Vice President, 4Penny.net
www.VSToolsForum.com - Dynamics GP development forum
www.devshed.us - Coding blog

Microsoft SqlServer 2008 Management SqlStudio Error


I am just installed SqlServer 2008 and then i am getting error when i am exploring server in Management Studio

OS Windows 7 Home Premium.

I and then when i am lunched Management studio there am getting popup window with the willowing error:

Value cannot be null.
Parameter name: viewInfo (Microsoft.SqlServer.Management.SqlStudio.Explorer)

Here is detailed information of this error:


Value cannot be null.
Parameter name: viewInfo (Microsoft.SqlServer.Management.SqlStudio.Explorer)

Program Location:

at Microsoft.SqlServer.Management.SqlStudio.Explorer.ExplorerViewDescriptor..ctor(IFactoryService factoryService, INavigationViewInfo viewInfo, String urnPath, IDictionary`2 allEntities)
at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.GetView(String urnPath)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.<GetColumnsFromNavigationService>d__f.MoveNext()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.AddFields(List`1 list, IEnumerable`1 fields, IDictionary`2 allValidFields, AddFieldsFlags flags)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.GetF

Microsoft.SqlServer.SMOEnum dll missing in Sql Server 2008


I am Creating a Project in SQL Server 2005 for Finding the Database Servers in the Network using SQL SMO.

But when I Upgrade my project from SQL Server 2005 to SQL Server 2008, my code throws some SMO Error.

My Code is looks like :


Function FindServers()

    Dim dtlSQLServers As DataTable


      dtlSQLServers = SmoApplication.EnumAvailableSqlServers(True)

    Catch ex As Exception


      dtlSQLServers = Nothing

    End Try

    Return dtlSQLServers

  End Function

SmoApplication throws error and shows that it is unavaliable in SQL Server 2008.

and not found manually C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.SmoEnum.dll.


So, what is the substitue of SMOEnum ?

Visual Studio 2008 Memory problems


My memory in task manager reaches about 900,000K  and I don't know why it does this. Definately slows everything down, especially when I rebuild my tableAdapters, takes about 30 seconds sometimes to rebuild the project.

Problems converting VS 2003 project to VS 2008



I'm having problems converting a VS 2003 project to VS 2008 (tried 2005 as well, same problem). There are several problems;
a) I don't have VS 2003 installed.
b) The project is a web service, however I'm not sure what type of VS project it was created as.
c) The general knowledge about the project setup is..slim.

I get a error message using the conversion wizard, however, I'm not familiar with the tool and I cannot quite find any good information on Google for it, so I am left with a error message I do not understand.

Conversion Issues - myProject.csproj:
Unable to open the Web site 'C:\local\path\to\project\myProject.csproj'. The Web site 'C:\local\path\to\project\myProject.csproj' does not exist.

The web service is not intended to run on the dev machine, it is copied to a test or a prod server. However, I do not know how this was done previously. I'm thinking that in order to convert, it has to access the server on which it should run (which is set somehow in a config maybe). But that doesn't actually make any sence..

If anyone could shed light on this, I would really appreciate it.

Thank you.

SSRS 2008 R2 and sharepoint 2007 report builder problems


I upgraded our enterprise sql server 2008 to sql server 2008 r2 last weekend.  Along with this i installed the report builder 3.0 on the servers as well and the updated ssrs add in for sharepoint.  The upgrade went fine, no errors that i could find.  The problem is now when i go to a library that has the report builder content type enabled and click report builder report under new it does not load report builder 3.0.

I updated the custom report builder url in central administration from /_vti_bin/ReportBuilder/ReportBuilder_2_0_0_0.application to /_vti_bin/ReportBuilder/ReportBuilder_3_0_0_0.application

however when i do click the new report builder report it kicks me over to http://company.com/ReportServer_MossEnt  which itemizes out each individual sharepoint site in the farm.

Is the integration of ssrs 2008 r2, sharepoint 2007 and report builder 3.0 work?  did i install the wrong version of the report builder add in?  The above is the only problem i am having now.

all servers are server 2008, 64 bit and moss 2007 enterprise with sp2 & april 2010 cu

SQLServer 2008 Tools and SQL 2005 Cluster

I recently built a SQL Server 2005 cluster on the o/s Windows Server 2008 R2.  I have been attempting to connect to the cluster from my Windows 7 dekstop with my SQL Server 2008 Tool set.  I have been unable to attach to this cluster since its creation. The firewall is temp off, remote connections in the surface area configuration is set to pipes and tcp/ip and the Browser surface is up and running. I ran Wireshark against the cluster and I could see that there was UDP conversations for ms-sql-m (SQL Port) but that was as far as it would get.  I am using a named instance so not using 1433, but I do see the cluster offering up high RPC ports but the client never responds after the initial UDP response. When I noticed that there was a two way conversation taking place, I went to a seperate machine and fired up SQL Server 2005 Tools and I was easily able to attach to the cluster.  So my question is - Are there any known incompatibilities between SQL Server 2005 cluster services and SQL Server 2008 Tool set?  I can use my 2008 tools to attach to a non-clustered SQL Server 2005 w/o issue.   Error when attempting to connect: A network-related or instance-specific error occured while establishing a connection to sql server.  The server was not found or was not accessible.  Verify that the instance name is correct and the SQL Server is con

Could not load file or assembly 'Microsoft.SqlServer.BatchParser' or one of its dependencies

I got this problem when I tried to migrate one of my web deployment project from vs2005 to vs2010 on windows 7 machine. The exactly error message is like this: Could not load file or assembly 'Microsoft.SqlServer.BatchParser' or one of its dependencies. An attempt was made to load a program with an incorrect format.(description) ASPNETCOMPILER(file), myWebDeploy (project) I have installed all of suggested feature packs as suggested by others: SQLServer2005_ADOMD_x64.msi, SQLServer2005_XMO_x64.msi. Can somebody please help? Thanks a lot 

What happened to the backup and restore classes in namespace Microsoft.SqlServer.Management.Smo vers

I do not see these two classes in version 10 of this namespace and I am not finding any documentation explaining what happened to them.

Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=

Hello to everyone. I have a .exe which uses the Server Management Objects(SMO) When I try it on my pc it runs without any problem. But on another pc it gives this error: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. I'm using SQL Server 2000 and for the application: Visual Studio 2005. Any idea would be very useful!! Thanks in advance!!

Powershell script that uses Microsoft.SqlServer.Management.Smo.Server need to use Sql Server Autheni

I have written a powershell script that uses Microsoft.SqlServer.Management.Smo.Server.  I have a couple of instances that are on different domains that I must use Sql Server authenication.  I am going to create a report user "sssmorpt".  What is the least a can grant this user to allow me to use Microsoft.SqlServer.Management.Smo.Server to get "$dbsize = $db.size - ($db.logfiles|measure-object -property size -sum).sum / 1024" for all databases in an instances?

How I can remove The Microsoft SQL Server 2008 Express installation manually.

How I can remove The Microsoft SQL Server 2008 Express installation manually ?   Other components uninstalled via Add/Remove but i cant remove SQL Server 2008 Express     From Add/Remove the following is installed:Microsoft SQL Server 2008   I have attempted to uninstall it via the Add/Remove method and this also failed.

Having problems installing/setting up SQL Server 2008 Express/R2 for ASP.NET user management on deve

I'm a bit new to installing and configuring, well, just about anything regarding databases, so please bear with me. I'm currently building a couple of ASP.NET MVC 2 sites.  I'm following along with the MVCMusicStore tutorial, and am trying to set up user management using ASP.NET's configuration tool.  The problem is that ASP.NET can't 'see' the database. I have SQL Server 2008 installed on my laptop.  It's the version which is available on the Web Platform Installer (I believe it's Express).  When I try running the aspnet_sqlreg.exe program to set up my user management database, it can't tell that I'm running any version of SQL Server at all.  I get an exception about 'named pipes', and some other things I don't understand at the moment. Obviously, this is all a bit over my head.  Is there an idiot proof guide or tutorial available that describes, step-by-step, how to: 1. Install SQL Server 2008 on a development PC 2. How to configure it to be used by Visual Studio 2010 Professional 3. How to properly upload/modify the db on the production server with what's on the development PC Essentially, all the things that the ASP.NET tutorials gloss over.  Any suggestions, links to documentation, or other nudges in the right direction would be immensely appreciated.

Not able to install SqlServer 2008 says Restart computer failed

While trying to install SqlServer2008 it show Restart computer as failed. I have restarted my computer and still it shows the same error. Cant proceed further. Please advice on how to proceed to install SqlServer 2008.   Thanks Ashok

sql server 2008 - sqlserver(mssqlserver) services can't start

Sorry i need help, i have instal and reinstal sql 2008 over and over but always failed the problem is the services can't start and when i cek error log this written: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.0.1600.22%26EvtType%3d0xE53883A0%400xBE03358B%401306%4024

Getting "wrong" data out of a microsoft.sqlserver.management.smo.database object property (using pow

My problem:I do something like this:$dbsvr = new-object microsoft.sqlserver.management.smo.server "servername"$dbsvr.databases | ft name,size -autosizeWhen i run this from two different PC's i get database sizes that are all the same (5.25 mb), the size of the first database listed - which is master.I started to try out a few things, and found out that when i run the same command from one of our servers it returns the correct sizes...Anyone have any idea if this a SMO issue, or maybe some package software version issue...- or what?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend