Re: Using SMO for SQL Server 2008 Express AND SQL Server 2005 Expr

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



As I investigate this issue (and become more familiar with Windows deployment
in general and SMO and SQL Server in particular), I find I am able to
describe our situation a little better (and more accurately).

I now understand that in fact, when we package our application with
InstallShield, InstallShield bundles our SMO references into our installer.
So I was incorrect earlier when I thought we were not redistributing the SMO
libraries.

In fact, we see these behaviours:

1. If we reference SMO 9 in our .csproj, build our application, and install
it on the test computer, we see SMO v9.00.3042.00 libraries have been copied
into our application folder along with our own components. This build will
work with SQL Server 2005, whether local or remote. (Note that in the local
case, there will also be copies of v9.00.242.0 of the SMO libraries located
in C:\Windows\assembly.) If we run this build against SQL Server 2008 we get
the ConnectionFailure Exception "This SQL server version (10.0) is not
supported." (This seems reasonable, since SQL Server 2008 did not exist when
these libraries were released.)

2. If we reference SMO 10, we see SMO v10.0.1600.22 libraries copied into
our application folder. This confirms that we have RTM and not RC0 versions.
This build will work with SQL Server 2008, whether local or remote. If we
run this build against SQL Server 2005, we get the error "Could not load file
or assembly 'Microsoft.SqlServer.BatchParserClient, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
The system cannot find the file specified."

In the case of (2), we noticed that Microsoft.SqlServer.BatchParserClient
was not among the SMO libraries copied by our build process, so we put in a
little hack to copy this dll as well. Afterwards, if we attempt to test
against SQL Server 2005 we get a similar error message, this time for
Microsoft.SqlServer.BatchParser.

Some specific questions fall out of this (aside from the general question of
how to make this work as simply as possible):

a) It's possible we follow this process and add hacks that will copy over
each missing dll, but will we run into problems with platform-specific dlls?

b) Now, I noticed that when we are testing our SMO 10 build against SQL
Server 2005, the server is a local instance. Thus, there are v10 SMO
libraries in our application folder and v9 libraries in C:\Windows\assembly.
Can this be contributing to our problem?

c) Has SMO v9 ever been updated to support SQL Server 2008? I have seen
claims that it would be, but I have not been able to find a download that
includes this support.

Thanks to anyone with advice!
.



Relevant Pages

  • Re: Using SMO for SQL Server 2008 Express AND SQL Server 2005 Expr
    ... I have SMO 9 binaries in my application folder and SMO 10 ... we see SMO v9.00.3042.00 libraries have been copied ... into our application folder along with our own components. ... work with SQL Server 2005, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: As I investigate this issue (and become more familiar with Windows deployment
    ... We have an application that uses SMO (SQL Server Management Objects) to ... Building against these libraries allowed our application to work with SQL ... after compiling against the latest SMO libraries when we now try to ... is there a download (or redistributable installer) that will ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Using SMO for SQL Server 2008 Express AND SQL Server 2005 Expr
    ... InstallShield bundles our SMO references into our installer. ... we see SMO v9.00.3042.00 libraries have been copied ... work with SQL Server 2005, ... little hack to copy this dll as well. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Question on SMO and DMO
    ... Thanks for the detailed information about SMO. ... Thanks so much for useful info like Powershell. ... cover new features in SQL Server 2008 and beyond. ... This feature will be removed in a future version of Microsoft SQL Server. ...
    (microsoft.public.sqlserver.programming)
  • Re: Question on SMO and DMO
    ... I would not recommend DMO, it is no longer being developed, so will not cover new features in SQL Server 2008 and beyond. ... Uri and Plamen are correct that DMO was a COM API, while SMO is a .NET object model. ... Avoid using this feature in new development work, and plan to modify applications that currently use this feature. ... Other Microsoft server products provide PowerShell support, so it is now a scripting language that applies to multiple products. ...
    (microsoft.public.sqlserver.programming)