Thursday, May 9, 2013

Adding Attributes to the FIM MV Schema Programmatically

Adding new attributes programmatically to the Metaverse is currently not supported by FIM in any of its forms, however, if you are willing to take the chance and make the changes needed directly to the database, this is possible.  This isn't necessary recommended and it is definitely not for the faint of heart. However, if you are determined to give it a try, here is what you have to do. First, make a backup of your database, then:

For single-valued non-reference attributes:

  1. Add a column to the mms_metaverse table with the appropriate name and data type
  2. Add a column to the mms_metaverse_lineagedate table with the appropriate name and a data type of datetime
  3. Add a column to the mms_metaverse_lineageguid table with the appropriate name and a data type of uniqueidentifier
  4. If you want the attribute to be indexed - add a new non-unique, non-clustered index to the mms_metaverse table with the name IX_mms_metaverse<attributeName>

Then, for all attributes (single or multi, reference or not) you will then need to:

  1. Update the mv_schema_xml column of the mms_server_configuration
  2. Close the client, restart the Sync Service and re-open the client

I have only done some preliminary testing, but so far it has worked okay. I have worked out a SQL Script to help you through the process.  Its called MVAttributeCreationScript.sql and you an download it from http://sdrv.ms/11oBRr8.

If you are uncomfortable attempting to update the schema in this fashion, there are a couple of other possibilities. However, these also carry their own risks:

  1. Export the MV Schema, update the xml export file and then re-import it
  2. Create a key stroke script to perform the updates through the UI as a user would

I will create some additional blog posts to expound on these two methods a little bit further, so be on the lookout!

Wednesday, May 8, 2013

Now On Twitter

You can now follow my escapades on Twitter.