Thursday, 20 June 2013


Troubleshooting (user profile synchronisation service) SharePoint 2010
 

Please Note: These steps should only be used if SharePoint user profile synchronisation service is stuck on starting or will not start or continues to fail.






 
Stop the SharePoint user profile synchronisation service instance that is stock on starting using powershell.

 




When the Administrator powershell window opens, type in the following cmdlet (get-spserviceinstance ) as seen below:



Copy the ID of the of the user profile sycronisation service that you want to stop , in the status would normally say provisioning .

Now type in the cmdlet ( stop-spserviceinstance ) see pictures below:

 




Type in Y and the instance will stop.
 
Please Note:  You need to do an IISRESET after performing these steps before going on to the other steps.


NEXT: go to Central Admin and click on monitoring, then Check Job Status

DELETE any user profile provisioning jobs


Go into the SharePoint central administration site, and then click on service on this server



As you can see below the User Profile Synchronisation service is in a stopped state


You will need to take the following steps before attempting to start the service:

Go into registry editor as seen below



CurrentControlSet , then service , then FIMservice. Please check that the database specified in the view below is the correct database and connection











NEXT add the farm account into all the FIM service Groups





3rd Step:
Go into the system folder for the FIM system






Delete everything in the MA folder!



NEXT: delete all the forefront identity manager PERSOLAL certificates and also all the Root TRUSTED certificates













Delete all forefront identity manager personal certificates as seen below:




Delete all forefront identity manager Trusted Root Certificates






Go into windows components services and enable Local DTC



 

Local DTC should be set as seen below



Now go back to central Admin Site, Click on Manage Services on this Server then Pick from the drop down menu the user profile application that you want to you and then click start to start the user profile sync service.

Please note: that you have to type in the passwords – please do not copy and past here.







Resolving issues with Search Query component when the server hosting the query component go off line and cannot be restored.

Resolving issues with Search Query component when the server hosting the query component go off line and cannot be restored.




I suspect that this is set to 2 (the default), which would cause problems if one of the Query Components were not available.



1.       Verify  the current value for MinimumReadyQueryComponentsPerPartition using the following shell command :
$ssa = Get-SPEnterpriseSearchServiceApplication "Your Search Service Application Name"
$ssa.MinimumReadyQueryComponentsPerPartition

·         This property defines the minimum number of the query components used in each index partition
·         The value was currently set to 2 (the default value)
o        When the query server in ATT-2 was taken offline, the farm only had 1 query component available for this index partition (e.g. which was below the ‘Minimum’ value)
o        Secondly, during a crawl, the crawler will attempt to propagate to the query components
§         With only 1 query component available and a ‘Minimum’ of 2 required, the propagation could not complete – making the crawl appear hunged ( crawl stuck on running )
§         This will also apparently put the query in a state that prevented queries from completing

2.       Updated the value for MinimumReadyQueryComponentsPerPartition using the following:
$ssa.MinimumReadyQueryComponentsPerPartition = 1
$ssa.update()
·         Upon updating, the query component from the offline server was no longer present in the UI

3.       We then removed the inactive query topology using:
$ssa | Get-SPEnterpriseSearchQueryTopology
$oldTopo = Get-SPEnterpriseSearchQueryTopology -identity [Id-GUID-value-for-inactive-qTopo] -SearchApplication $ssa
$oldTopo | Remove-SPEnterpriseSearchQueryTopology
4.       When we attempted to remove the Query topology in ‘Deactivating’ state, it failed because it was not inactive
o        We attempted to use $oldTopo.cancelActivate(), but this made no difference
o        Attempting to stop the currently running crawl also made no difference
5.        We overcame the pinned crawl and deactivating query component by resetting the index
o        Afterwards, the ‘Deactivating’ Query topology went to an ‘Inactive’ state, which allowed it to then be removed
6.       We were then  able to start a full crawl







I also tested if having 4 query components (e.g. two index partitions with Query Components 1 & 2m on ServerA and Query Components 1m & 2 on ServerB) made any difference, but the crawl also “hung” waiting for query components in my test. Given the definition for this parameter (“This property defines the minimum number of the query components used in each index partition”), this is expected.

Also, in my test, the Query components on the server I took offline (e.g. I simply paused my VM hosting this component) were not marked as Offline or Disabled even after setting this ‘Minimum’ value. Therefore, when I started my crawl after pausing this server, the crawl appeared to hang. However, I was able to manually disable the Query components on this offline server by using the following PowerShell (it’s also worth noting that this took effect immediately – without cloning/activating a topology – and it also took affect during an active crawl):

$qTopo = $ssa | Get-SPEnterpriseSearchQueryTopology -active
$QCs = Get-SpEnterpriseSearchQueryComponent -QueryTopology $qTopo
$QCs | format-list
   #using the IDs of the Query Components in this output
#i entered the Id to the shell identity below
$p2QC = Get-SpEnterpriseSearchQueryComponent -QueryTopology $qTopo -identity 111-111-111-111
$p2QC.setOffline()
   #repeat for any Query Component in the now-offline data center







Tuesday, 11 September 2012

Creating an LDIF file connection in SharePoint 2010

In order to Create and LDIF file connection you need to Lunch the forfront identity manager in sharepoint


1.       Launch the FIM client - C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe

2.       Open the Metaverse Designer (at the top), click on “person”, then “Add Attribute” at the bottom, the “New Attribute” and add a new attribute called businessUnit. This step is because there is no pre-defined metaverse attribute which relates to Business Unit.



3.       Copy this XML file to a location on the FIM server


4.       Import Management Agent:-



5.       Select the xml file and step through the creation steps hitting next each time

















6.       Hit finish

7.       Select the MOSS MA and click properties (this is the OOTB MA which gets created with SharePoint install and needs to be manually edited)



8.       Select “Configure Attributes” and create the new attributes in the red box below


9.       Create them as follows – type the attribute name into the box and hit OK. Repeat for the other attributes




10.   Select “Define Object Types” and click Edit



11.   Select the new attributes from the left panel and click “Add” to add them to the bottom right panel. Click OK



12.   Select “Configure Attribute Flow” and expand “Object Type: user”



13.   Scroll to the bottom and add the new mappings in the red box



14.   To add the mappings, select the data source attribute and corresponding metaverse object type,  select “Export” and “Allow Nulls” and click “New”


15.   Check “Configure Attribute Flow” for both the MOSS MA and the LDIF MA and ensure all mappings are set up as follows

MOSS MA

SP UP Attribute
Export Mapping
Metaverse Attribute
FirstName
ß
givenName
LastName
ß
sn
userID
ß
uid
NEW: division
ß
division
NEW: businessUnit
ß
NEW:businessUnit
Department
ß
department
Office
ß
postalAddress
NEW: costCentre
ß
costCenter
Manager
ß
manager
NEW: internalWorkNumber
ß
officePhone
WorkPhone
ß
telephoneNumber
NEW: internalMobileNumber
ß
mobilePhone
CellPhone
ß
mobile
PreferredName
ß
displayName
WorkEmail
ß
mail
SPS-Location
ß
location

LDIF MA

LDIF File Attribute
Import Mapping
Metaverse Attribute
FirstName
à
givenName
LastName
à
sn
UserName
à
uid
division
à
division
businessUnit
à
NEW:businessUnit
Department
à
department
office
à
postalAddress
costCentre
à
costCenter
Manager
à
manager
internalWorkNumber
à
officePhone
WorkPhone
à
telephoneNumber
internalMobileNumber
à
mobilePhone
CellPhone
à
mobile
PreferredName
à
displayName
WorkEmail
à
mail
SPS-Location
à
location