IMPORTANT: Allways perform a FULL Backup of the database before doing anything to it !!!

ALSO: It is advised that you open a case at Microsoft before doing this - directly editing the database is not supported and you may find yourself in an unsupported state if anything goes wrong.

 

Installed System Center Orchestrator 2012 RTM a couple of days ago and then wanted to build a RunBook using the Active Directory Integration Pack. Ok, no worries, I installed the Active Directory 7.0 BETA Integration Pack - that was available at the time ... and everything worked, no problem :D

But today I needed to work with it again and found out that the Active Directory 7.0 RTM Integration Pack is out so I un-deployed the BETA AD IP and un-registerd it. After this I have registered and deployed the RTM version which is available here.

Now then, let's create a new RunBook and then create the AD Conenction via the Active Directory Configuration wizard.

Well what do you know? Doesn't work anymore ... now I'm getting a strange error as if something went wrong with the install of the IP:

Failed to load the assembly containing the service class.

 Hmm ... it seams that it doesn't find the right assembly or some class in the assembly. The names of the DLLs and Classes (actual IP objects used in the designer) out of DLLs of the Integration Packs are stored in the Orchestrator database in the table CONFIGURATION.

Ok so after checking the GAC I found out that the name of the AD IP DLL for example is: Microsoft.SystemCenter.IntegrationPack.ActiveDirectory.dll

Now let's check the database - so I ran this SQL query on the Orchestrator database (the GUID used it of the AD IP DLL):

SELECT DataValue
FROM CONFIGURATION
WHERE
   TypeGUID = '796D217E-1BF5-4C4A-8336-18B5BFD00092'

 

 Well looking at the results we can see that we have different names in the database for the DLL ... and this means that it will be a different name for all the objects (Classes) as well ...

<configurationtypes>
   <configurationtype>
      <name>ActiveDirectoryConfiguration</name>
      <library>796d217e-1bf5-4c4a-8336-18b5bfd00092\Microsoft.SystemCenter.Orchestrator.ActiveDirectoryIP.dll</library>
      <class>Microsoft.SystemCenter.Orchestrator.ActiveDirectoryIP.ActiveDirectoryConfiguration</class>
      <description></description>
   </configurationtype>
</configurationtypes>

 

 The name of the DLL and the starting string for the Class names in the RTM 7.0 AD IP is:

Microsoft.SystemCenter.IntegrationPack.ActiveDirectory.*

but the strings found in the database match the names used for the BETA 7.0 AD IP:

Microsoft.SystemCenter.Orchestrator.ActiveDirectoryIP.*

 

 So I've written this SQL query that will set the correct names for the DLL and all Classes inside the Orchestrator database and executed it:

DECLARE
   @UniqueId UNIQUEIDENTIFIER,
   @DataValue NVARCHAR(MAX),
   @OldName NVARCHAR(255),
   @NewName NVARCHAR(255)
SET @OldName = N'Microsoft.SystemCenter.Orchestrator.ActiveDirectoryIP.'
SET @NewName = N'Microsoft.SystemCenter.IntegrationPack.ActiveDirectory.'
DECLARE WorkCursor CURSOR LOCAL FORWARD_ONLY READ_ONLY FOR
   SELECT
      UniqueID,
      DataValue
   FROM CONFIGURATION
   WHERE DataValue LIKE '%' + @OldName + '%'
OPEN WorkCursor
FETCH NEXT
FROM WorkCursor
INTO
   @UniqueId,
   @DataValue
WHILE @@FETCH_STATUS = 0 BEGIN
   UPDATE CONFIGURATION
   SET DataValue = REPLACE(@DataValue, @OldName, @NewName)
   WHERE UniqueID = @UniqueId
   FETCH NEXT
   FROM WorkCursor
   INTO
      @UniqueId,
      @DataValue
END
CLOSE WorkCursor
DEALLOCATE WorkCursor

 

 

Now the Active Directory Integration Pack 7.0 RTM is working and I'm not getting those strange errors about not finding assemblies and stuff ... cool huh?! :D