How to use the new functionalities of the SQL Server 2008 version of SMO in an application that uses the SQL Server 2005 version of SMO

Article translations Article translations
Article ID: 956026 - View products that this article applies to.
Expand all | Collapse all

SUMMARY

In Microsoft SQL Server 2008, new functionalities are added to SQL Server Management Objects (SMO). An application that uses the SQL Server 2005 version of SMO cannot be compiled by using the SQL Server 2008 version of SMO. You must make some changes to the application, and then you must recompile the application. Then, you can use the new functionalities in the SQL Server 2008 version of SMO.

INTRODUCTION

This article describes what you must do to use the new functionalities of the SQL Server 2008 version of SMO in an application that uses the SQL Server 2005 version of SMO.

MORE INFORMATION

In the SQL Server 2008 version of SMO, some SMO classes that are included in SQL Server 2005 are replaced by new classes. For more information about these SMO classes, visit the following Microsoft Developer Network (MDSN) Web site:
http://msdn.microsoft.com/en-us/library/ms143729(SQL.100).aspx
If you have an application that uses the SQL Server 2005 version of SMO, you must make the following changes to use the new functionalities in the SQL Server 2008 version of SMO:
  • Reference the SQL Server 2008 version of the following assemblies in the application:
    • Microsoft.SqlServer.ConnectionInfo.dll
    • Microsoft.SqlServer.Smo.dll
    • Microsoft.SqlServer.Management.Sdk.Sfc.dll
  • Delete the reference to the Microsoft.SqlServer.SmoEnum.dll assembly from the application.
  • For connection-related classes, use the classes in the Microsoft.SqlServer.ConnectionInfo namespace.
  • Instead of using the Microsoft.SqlServer.Management.Smo.Urn class, use the Microsoft.SqlServer.Management.Sdk.Sfc.Urn class.
  • If you use the Microsoft.SqlServer.Management.Smo.Transfer class in the application, also add a reference to the Microsfot.SqlServer.SmoExtended.dll assembly in the application.
By default, the assemblies that are mentioned earlier are located in the following folder:
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies
Note You must add these assemblies to the global assembly cache on the computer.

After you make these changes, recompile the application. Then, you can use the new functionalities in the SQL Server 2008 version of SMO.

REFERENCES

For more information about SMO, visit the following MSDN Web site:
http://msdn.microsoft.com/en-us/library/ms162169(SQL.100).aspx

Properties

Article ID: 956026 - Last Review: March 19, 2009 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Standard Edition for Small Business
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
sql2008relnotedatabaseengine sql2008relnote kbhowto kbexpertiseadvanced kbinfo KB956026

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com