Support for SMO in MSSQL 2000 MSDE

Answered Support for SMO in MSSQL 2000 MSDE

  • Monday, April 02, 2012 10:26 AM
     
     

    Hi,

    I have some problems using SMO with MSSSQL Server 2000 MSDE on Windows 2003 R2 Sp2.

    I have installed:

    -SMO 2008 R2

    -System CLR Types

    -SQL Server 2008 R2 natvie client along with SDK

    SQL Server is running but im not able to enumerate server instances due to the following exception:

    Unhandled Exception: Microsoft.SqlServer.Management.Smo.SmoException: SQL Server
     WMI provider is not available on SERVER-G0H941. ---> System.Management.Manage
    mentException: Invalid namespace
       at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStat
    us errorCode)
       at System.Management.ManagementScope.InitializeGuts(Object o)
       at System.Management.ManagementScope.Initialize()
       at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.TryConnectUsingPath
    (ManagementPath path)
       --- End of inner exception stack trace ---
       at Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer.TryConnect()
       at Microsoft.SqlServer.Management.Smo.Wmi.WmiSmoObject.get_Proxy()
       at Microsoft.SqlServer.Management.Smo.Wmi.WmiSmoObject.EnumChildren(String ch
    ildTypeName, WmiCollectionBase coll)
       at Microsoft.SqlServer.Management.Smo.Wmi.ServerInstanceCollection.Initialize
    ChildCollection()
       at Microsoft.SqlServer.Management.Smo.Wmi.ServerInstanceCollection.GetEnumera
    tor()

    What is tricky... i've found out that when I installed MSSQL Management Studio 2008 R2 my code works properly...

    Does anyone know how to resolve that issue without MSMS installaed ?


    • Edited by marteek Monday, April 02, 2012 1:33 PM
    •  

All Replies

  • Tuesday, April 03, 2012 7:42 AM
    Moderator
     
     

    Hi Marteek,

    >> Unhandled Exception: Microsoft.SqlServer.Management.Smo.SmoException: SQL Server WMI provider is not available

    Regarding to the error message, which might be related to the WMI Provider is not installed for SQL Server 2000. It needs to be installed separately using the WMI Admin Provider Setup available along with the SQL Server 2000 Setup CD under x86\other\wmi folder.
    For more information, please refer to HOW TO MANAGE SQL SERVER 2000 Services USING WMI http://social.technet.microsoft.com/Forums/en-US/sqlexpress/thread/7eb8074d-cc2e-44c3-b66c-22537daef19e

    Additional, please refer to Microsoft.SqlServer.Management.Smo.Wmi Namespace


    Regards, Amber zhang

  • Tuesday, April 03, 2012 10:25 AM
     
     

    Hi,

    I have installed SQL Wmi Provider from MSSQL 2000 setup cd, restart operating system, but still the same exception,

    after that I've installed Sql Management Studio and code worked without exception, then I've uninstalled Management studio and exception occured. What does Management Studio install/change on operating system what I have missed ??

  • Tuesday, April 10, 2012 9:31 AM
    Moderator
     
     Answered
    Hi Marteek,

    >>I have some problems using SMO with MSSSQL Server 2000 MSDE on Windows 2003 R2 Sp2.
    I have installed: -SMO 2008 R2  -System CLR Types -SQL Server 2008 R2 natvie client along with SDK

    Regarding to your description, SMO extends and supersedes SQL Server Distributed Management Objects (SQL-DMO) which was used for SQL Server 2000. If you are using SMO 2008 R2 the SMO assemblies are installed automatically when you install Client Tools (SSMS) . That might be once you install SQL Server Management Studio, and then there is  no exception occurred.

    If you don’t want to install SSMS you can try to install SMO assemblies only. The location of assemblies in SQL Server 2008 R2 is C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies folder.

    Meanwhile that might be because of the SMO provides support for SQL Server 2000 but a few namespaces and classes are not supported in prior versions.

    Regards, Amber zhang

  • Friday, April 13, 2012 2:39 PM
     
     

    Actually SMO assemblies are installed because I have installed SMO from msi package without Management Studio. but... maybe assemblies need to be registered or re-registered... I will check that..