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

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

Can not find Microsoft.SqlServer.InstApi when trying to run a SMO trace

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :Sql Server

I install the follwing components

1.Microsoft SQL Server 2005 Management Objects Collection

2.Microsoft Core XML Services (MSXML) 6.0

3.Microsoft SQL Server Native Client

(available from http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&DisplayLang=en)

on a clean machine with no SQL Server 2005 client tools.

I get the following error.

Failed to initialize object as reader.
Could not load file or assembly 'Microsoft.SqlServer.Instapi, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.


A gacutil tells me that this assembly is not installed.

Is there are way to run SMO trace without having to install the 2005 client tools and only the Management Objects Collection and necessary components?

Sample code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;

View Complete Post

More Related Resource Links

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 

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

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?

I have added new fields to a table in SQLserver, why could not find these new fields in Analysis Ser

I have added new fields to a table in SQLserver, why could not find these new fields in Analysis Services database source view?  My version is 2005.

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?

Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: No description found

Hi, I'm getting the following error: Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: No description found  when I try and add a excel connection manager to a package being generated programmatically.   I'm working with SQL Server 2008 SP1 (64bit) and Microsoft Office 2007 Data Components (32bit) on a Windows Server 2008 R2 (64bit) The code is executed by a WCF service hosted on IIS7 with the app pool running in 32bit mode. Since this is the 4th environment on which the app is being deployed and the only one that throws the error, I don't think it's an actual problem with the code. One thing that could be significant is that the new box I'm trying to deploy my app to is a VMWare virtual machine whereas all the others are physical servers. What could possibly throw this error? It's very non-descript :( Any suggestions and ideas would be greatly appreciated.

Help: Could not find schema information for the element 'microsoft.web.services2'

(Sorry I may have posted this in a wrong forum earlier) Hi, I've got this problem, trying to add a simple user authentication feature to my web service. I added the code directly copy-paste from MSDN as well as trying load of other ideas why this might happen... I've been getting these "information messages" that practically disables my client application from connecting to the web service. (I'm developing this on my PC, visual web developer 2005) Adding the microsoft.web.services2 section results in: Could not find schema information for the element 'microsoft.web.services2' Could not find schema information for the element 'security' Could not find schema information for the element 'securityTokenManager' Could not find schema information for the element 'type' Could not find schema information for the element 'qname' HELP PLEASE!!! web.config (relevant parts only, I cut out system.web and other sections): <?xml version="1.0"?> <configuration> <configSections> <section name = "microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </configSections> <microsoft.web.services2> <security> <securityTokenManager type="ServiceNameSpace.User,ServiceNameSpace" xmlns:wsse="ServiceNameSpace"

0xC0010014 (Microsoft.SqlServer.DTSRuntimeWrap)

64 bit Server 2003 with Sql 2005 64-bit I can't seem to do a lot of things.  Like... backup the database through the SQL agent.I'm catching flak from the client who was told by a microsoft rep that SQL 2005 works like a charm....It's too late to move away from SQL 2005, we've already migrated systems over to it, and now I'm stuck.This error happens when trying to export to a flat file using Export Wizard(right click database and choose export):===================================An error occurred which the SQL Server Integration Services Wizard was not prepared to handle. (SQL Server Import and Export Wizard)===================================Exception has been thrown by the target of an invocation. (mscorlib)------------------------------Program Location:   at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)   at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[]

A question about Microsoft.SqlServer.SqlParser.dll

Hi all, I found this library in SSMS 2008 assemblies, it can parse T-SQL statements into structured XML as well.  'Microsoft.SqlServer.SqlParser.Parser.Parser.Parse(SQL)' This function can resolve standard select/update/insert statements, and it's very useful to us for advance code policies check,  but it's not for all sql commands, for example: 'CREATE TABLE' is okay to go, but 'ALTER TABLE' is not. why? And one thing more, after SQL Server 2008 R2 is installed, this assembly disappeared.:( Is it a half-done job? Where can I find the final version?

Encountered "Could not find schema information for the element 'microsoft.web.services3'"

Hi  , I have tried to close my web.config and reopen in VS2005 to re-compile but I still encountered this error :Could not find schema information for the element 'microsoft.web.services3' . I have added in the configSection and any reference for the web.service3. Appreciate anyone who can assist me.  Below are my parts of my web.config : <configSections> <section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </configSections> <webServices> <soapExtensionImporterTypes> <add type="Microsoft.Web.Services3.Description.WseExtensionImporter, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </soapExtensionImporterTypes> <soapServerProtocolFactory type="Microsoft.Web.Services3.WseProtocolFactory, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </webServices> </system.web> <microsoft.web.services3> <security> <securityTokenManager> <add type="Microsoft.Web.Services3.Security.Tokens.UsernameTokenManager, Microsoft.Web.Services3, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35&qu

Microsoft.SqlServer.Dts and related assemblies to develop custom ssis task are missing

Hi All, I tried to develop a simple ssis task but the problem that I can't refer the necessary assemblies like Microsoft.SqlServer.Dts.Runtime And also Microsoft.SqlServer.DTSPipelineWrap Microsoft.Sqlserver.DTSRuntimeWrap Microsoft.Sqlserver.ManagedDTS Microsoft.SqlServer.PipelineHost What is certan that they aren't installed within the GAC in my case, so where could I find them? I have SQL server 2008 entrprise edition Other question, should I use Microsoft.SqlServer.Dts.Design and  Microsoft.SqlServer.ManagedDTS which are missed too, or they are part of the 2005 version only Thank you   The complexity resides in the simplicity

Failed to find SharePoint server when using Microsoft Transporter Suite

When attempting to migrate a Lotus Domino application into MOSS 2007 using the Microsoft Transporter Suite 2007, I get the error: "Failed to find SharePoint server for URL: http://shp7/resimport".  I have installed the Transporter Suite on the SharePoint server (Windows 2003), and am running it under an account with full SharePoint admin rights.  I fill out the Target SharePoint site and Target SharePoint list boxes as directed in the Transporter console's help.  I know the site is running, as I can see it when I use http://shp7/resimport in IE from the server.  Anybody else experience this problem?

newbie in Java .... java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver

Hi All, I am new to java, trying to learn and understand. I downloaded the 2008 R2 SQL server Express, Downloaded the JDBC jar file, unzipped it. and set class_path accordingly in environmental variables. C:\Program Files\Microsoft SQL Server JDBC Driver\sqljdbc_3.0\enu\sqljdbc.jar, C:\Program Files\Microsoft SQL Server JDBC Driver\sqljdbc_3.0\enu\sqljdbc4.jar Also I have added the sqljdbc_auth.dll in the system32 file as most of the content suggested. I tried running a simple program that microsoft has provided . I have not advanced to programs such as eclipse and others, I am using a simple textpad to write and see if it connects the way it is supposed to . I hope you can guide me through the process. My TCP/IP is enabled, dynamic ip is left to blank, I can successfully telnet to 1433 port . Am I doing something wrong or am I missing a step somewhere   import java.*; public class Connect{      private java.sql.Connection  con = null;      private final String url = "jdbc:microsoft:sqlserver://";      private final String serverName= "localhost";      private final String portNumber = "1433";      private final String databaseName= "Banking";      private final String userName = "sa";   &nb

Problems with SMO 2008 Redist + Microsoft.SqlServer.BatchParserClient

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

REBUILDDATABASE and Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException

I am trying to rebuild the master database in SQL 2008 x64 using the following command: setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=instance_name /SQLSYSADMINACCOUNTS= accounts  [/SQLCOLLATION=collation_name] and I get the following error: Exception type: Microsoft.SqlServer.Setup.Chainer.Workflow.NoopWorkflowException     Message:          The state of your SQL Server installation was not changed after the setup execution. Please review the summary.txt logs for further details. Any idea? Thanks Frank Russo
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