Often times when managing a FIM / MIM implementation you may find that you need information that is not available to you via the Synchronization Service Manager tool. An alternative method for getting that information is by directly querying the FIM Sync database. It should be noted that this is not a Microsoft supported method for retrieving FIM Synchronization data as there is risk in creating a lock on a record with your query at the same time that the FIM Synchronization service is processing that record which could cause data corruption. However, as David Lundell mentioned in a blog post, it is possible to do this safely using a couple of different approaches. For more on this, see his blog post here.
In this blog posting I’m sharing a few SQL queries that I put together that can provide some valuable information that can’t be found using the FIM Sync Manager tool to include:
- List of all users with the number of connectors for each
- List of the connectors that any given user has
- List of all connectors and the number of users that have that connector
- List of users missing a connector to the Active Directory management agent
- Total counts of metaverse and connector objects
https://www.getthereatx.com/capstone/100-word-essay-for-nursing/7/ follow link langston hughes a dream deferred essay https://completecompetentcare.com/20633-book-viagra-order/ how to write research paper apa format bachelor thesis english argumentative essay school drop outs new pink viagra source link see follow site viagra cortisone essayists and prophets what is advair diskus 100 50 used for melatonin long term http://partnerwith.ben.edu/blog/viagra-uk/11/ how to title an essay grammar here ap european history homework help pastilla azul sildenafil get link diversity research paper topics https://shepherdstown.info/conclusion/chicken-presentation/17/ essayer des coupes de cheveux send corrected version of why x essay with typo law school essay ideas for injustice enter https://themauimiracle.org/bonus/amitriptyline-fibromyalgie-dosering/64/ viagra livraison express en france corpus cavernosum where does viagra act Note: You will need to update the queries to support the Management Agent names that you are using in your environment.
List of all Users with the Number of Connectors for Each
SELECT accountName as "User",count(ma_name) as NumberOfConnectors FROM [FIMSynchronizationService].[dbo].[mms_csmv_link] as LINK LEFT JOIN [FIMSynchronizationService].[dbo].[mms_connectorspace] as CS with (nolock) ON CS.object_ID=LINK.cs_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_metaverse] as META with (nolock) ON META.object_id=LINK.mv_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_management_agent] as MA with (nolock) ON MA.ma_id=CS.ma_id WHERE CS.is_connector = 1 and CS.object_type = 'person' or CS.object_type = 'user' Group by accountName
List of the Connectors that Any Given User Has
SELECT accountName,ma_name FROM [FIMSynchronizationService].[dbo].[mms_csmv_link] AS LINK with (nolock) LEFT JOIN [FIMSynchronizationService].[dbo].[mms_connectorspace] AS CS with (nolock) ON CS.object_ID=LINK.cs_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_metaverse] AS META with (nolock) ON META.object_id=LINK.mv_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_management_agent] AS MA with (nolock) ON MA.ma_id=CS.ma_id WHERE CS.is_connector = 1 and CS.object_type = 'person' or CS.object_type = 'user' GROUP BY accountName,ma_name
List of All Connectors and the Number of Users that have that Connector
SELECT ma_name as Connector,count(accountName) as NumberOfUsers FROM [FIMSynchronizationService].[dbo].[mms_csmv_link] as LINK with (nolock) LEFT JOIN [FIMSynchronizationService].[dbo].[mms_connectorspace] as CS with (nolock) ON CS.object_ID=LINK.cs_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_metaverse] as META with (nolock) ON META.object_id=LINK.mv_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_management_agent] as MA with (nolock) ON MA.ma_id=CS.ma_id WHERE CS.is_connector = 1 and CS.object_type = 'person' or CS.object_type = 'user' Group by ma_name
Total counts of Metaverse and Connector Objects
SELECT MetaverseObjectCount, ConnectorSpaceObjectCount, MetaDirectoryObjectCount = MetaverseObjectCount + ConnectorSpaceObjectCount FROM (select count(*) AS MetaverseObjectCount FROM [FIMSynchronizationService].[dbo].[mms_metaverse] with (nolock)) as META CROSS JOIN (select count(*) AS ConnectorSpaceObjectCount FROM [FIMSynchronizationService].[dbo].[mms_connectorspace] WITH (nolock)) AS CS
List of Users Missing a Connector to the AD MA
SELECT accountName,ma_name FROM [FIMSynchronizationService].[dbo].[mms_csmv_link] AS LINK with (nolock) LEFT JOIN [FIMSynchronizationService].[dbo].[mms_connectorspace] AS CS with (nolock) ON CS.object_ID=LINK.cs_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_metaverse] AS META with (nolock) ON META.object_id=LINK.mv_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_management_agent] AS MA with (nolock) ON MA.ma_id=CS.ma_id WHERE accountName NOT IN (SELECT accountName FROM [FIMSynchronizationService].[dbo].[mms_csmv_link] AS LINK with (nolock) LEFT JOIN [FIMSynchronizationService].[dbo].[mms_connectorspace] AS CS with (nolock) ON CS.object_ID=LINK.cs_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_metaverse] AS META with (nolock) ON META.object_id=LINK.mv_object_id INNER JOIN [FIMSynchronizationService].[dbo].[mms_management_agent] AS MA with (nolock) ON MA.ma_id=CS.ma_id WHERE MA.ma_name = 'Active Directory') GROUP BY ma_name, accountName
I hope the SQL queries in this blog posting can be of assistance to you. If anything, they can serve as examples so that you may write your own queries and find information not available through the FIM Synchronization Tool. As always, please reply with questions or comments below! Thanks!