
Reversioning Your Custom Objects
How you reversion your custom objects depends on whether you wrote those objects in managed or native code:
-
Managed code. For custom objects written in managed code, reversioning means incrementing the assembly version number.
-
Native code. For custom objects written in native code, reversioning means changing the ProgID and CLSID.
After you reversion your custom objects, you have to provide upgrade mapping files for those objects. During package upgrade, these mapping files tell the package upgrade engine how to replace the previous versions of your custom objects with the new versions.
Mapping the Versions of Your Custom Object for Upgrade
SQL Server 2008 Integration Services adds a new subfolder, UpgradeMappings, in the %ProgramFiles%\Microsoft SQL Server\100\DTS folder. This subfolder is where you deploy the mapping files that tell the package upgrade engine how to map SQL Server 2005 Integration Services objects to their new SQL Server 2008 equivalents.
After you have deployed your mapping files to the UpgradeMappings subfolder, Integration Services will be able to upgrade packages that contain your custom objects. The mapping files are only necessary during package upgrade. After all packages have been upgraded, you can remove the mapping files. For more information, see Upgrading Integration Services Packages.
All mapping files must be in XML format, as shown in the following sample mapping file.
Note: |
|---|
|
Your mapping files must have the ".xml" file extension, or these files will not be discovered by the package upgrade engine.
|
Sample Mapping File
<?xml version="1.0" encoding="utf-8"?>
<Mappings xmlns="http://www.microsoft.com/SqlServer/Dts/UpgradeMapping.xsd">
<!-- Connection Managers -->
<ConnectionManagerMapping tag="MSOLAP - Analysis Services connections"
oldValue="MSOLAP90"
newValue="MSOLAP100" />
<!-- Extensions -->
<ExtensionMapping tag="my custom object"
oldAssemblyStrongName="MyCustomAssembly.MyCustomTask, MyCustomAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
newAssemblyStrongName="MyCustomAssembly.MyCustomTask, MyCustomAssembly, Version=2.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
<!-- Providers -->
<ProviderMapping tag="SQL Server Native Client - Version dependent"
oldValue="sqlncli.1"
newValue="sqlncli10.1" />
<ProviderMapping tag="SQL Server Native Client - Version independent"
oldValue="sqlncli"
newValue="sqlncli10" />
<ProviderMapping tag="MSOLAP - Analysis Services connections"
oldValue="msolap.3"
newValue="msolap.4" />
</Mappings>
Creating Your Own <ExtensionMapping> Element
As shown in the previous sample mapping file, the <ExtensionMapping> element is the element that maps the SQL Server 2005 Integration Services objects to their new equivalents for SQL Server 2008 Integration Services. After you create a new <ExtensionMapping> element, you have to supply values for the attributes in the following table.
|
Attribute
|
Description
|
|---|
|
tag
|
Text that describes your custom object. (This description is used for logging.)
|
|
oldAssemblyStrongName
|
The strong name of your custom object's assembly in SQL Server 2005 Integration Services.
|
|
newAssemblyStrongName
|
The strong name of your custom object's assembly in SQL Server 2008 Integration Services.
|
You have the following options when mapping assemblies:
-
You can use the fully qualified class name: <assembly name>.<class name>, <assembly name>, Version=<version>, Culture=<culture>, PublicKeyToken=<key>. This format is shown in the sample mapping file earlier in this topic.
-
You can provide the strong name of the assembly itself, without the class name, as shown in the following example:
<ExtensionMapping tag="my custom object"
oldAssemblyStrongName="MyCustomAssembly,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
newAssemblyStrongName="MyCustomAssembly,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
If you provide the strong name of the assembly itsefl, all classes from the old assembly will be mapped to the new assembly.