SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘management objects’

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

Symptoms
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.
Resolution
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.

FIX: You cannot use the SQL Server 2008 version of SMO to manage certificates in SQL Server 2005 and in SQL Server 2000

Symptoms
You try to manage certificates in Microsoft SQL Server 2005 and in SQL Server 2000 by using the SQL Server 2008 version of SQL Server Management Objects (SMO). An exception is raised, and SMO does not let you manage the certificates.
Resolution
This problem occurs because SQL Server 2008 has a specific property that SMO looks for when you try to manage certificates. However, SMO does not verify which version of SQL Server owns the certificates, and when it tries to initialize this SQL Server 2008 specific property, SMO raises the exception.