Thursday, August 29, 2013

Move Search Components To Different Server in SharePoint 2013 Problem


I want to move search components from front end server to separate server, I used the flowing url:
http://altfo.wordpress.com/2013/04/19/move-search-components-to-different-server-in-sharepoint-2013/

After doing the following steps and checked search components, I found only crawled components moved successfully and others are suspended.

After investigations I remembered,  We did memory limitations for Fixing Performance Issue Caused By Node Runner In SharePoint 2013.
Memory limitations prevent creation of new search components successfully. I removed memory limitation and success to move search components.



Friday, August 16, 2013

SharePoint Migration Utilities

When I Migrated or revamped SharePoint I need to do some tasks help migrate old items, alerts, etc with new structure. I wroted some utilities to do these tasks using SharePoint API. I know there is many tools can do these tasks but here will find free utilities to do simple tasks.
Copy Files
Copy list Document libraries  and mapped old properties to new properties.

Copy Alerts
Copy Alerts from source web to destination Web

Copy Images
Copy Images from source image library to destination image library

Copy List Items
Copy List Items from source list to destination list

Copy Pages with resources
Copy Publish Pages between source and destination, Update layouts, clean HTML

Copy SharePoint Security
Copy Security between source and destination list.

Jungle.SharePoint.Util
Utilities help in migration tasks






Thursday, May 16, 2013

Reduce the size of logging database

To reduce the size of the logging database or to purge the old data from the logging database we can these steps:
By Default the system retains 14 days of Usage data in this database. You need to decrease value of the retention days by the following PowerShell Command:
Set-SPUsageDefinition –Identity "Event Selection" -DaysRetained days
Example:
Set-SPUsageDefinition –Identity “Page Requests" -DaysRetained 3
You can get values of retention days by the following command
Get-spusagedefinition
After that we need to run the two timer jobs to clean the old data, Go to Job Definitions and Run the following Jobs:
  • Microsoft SharePoint Foundation Usage Data Import
  • Microsoft SharePoint Foundation Usage Data Processing
Once the timer jobs is run you can check and confirm database has released the space.

Failed to unlock sitecollection

For some unknown reason for the admin user of our Moss site (and all other users who had full control permissions) the Site Action -> Site Settings menu option have disappeared from the home page. I can navigate to it by going to mysite/_layouts/settings.aspx but I can't change anything it says I do not have permissions.

IF the user logged IS the Site Collection administrator and still gets theses access denied messages, your Content Database seems to be locked. This happens during backups or when backups go wrong (get interrupted for example)
stsadm -o getsitelock -url http://server_name

if it is not showing as 'none', it is locked. fix command:
stsadm -o setsitelock -url http://server%5Fname -lock none

I used this command many times but when try to use with some sites it didn't work. I found Power Shell Commands Solved my Problem.
$Admin = new-object Microsoft.SharePoint.Administration.SPSiteAdministration(SiteUrl)
$Admin.ClearMaintenanceMode()
$site.MaintenanceMode



Monday, May 6, 2013

SharePoint 2013 Content source does not crawl

Where created new search service application and tried to crawl, It generate status starting and take a long time without changes and crawl duration still empty like image below.

I tried to recreate service many times and problem still exists.
I found error in Search Application Topology:
I fixed these problems by Fixing Query Processing, Steps to Fix Query Processing:
  1. Run SharePoint PowerShell
  2. Get the Search Service Application and clone the search topology:
    # Clone the active search topology
    $ssa = Get-SPEnterpriseSearchServiceApplication -Identity "Service Application Name"
    $active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
    $clone = New-SPEnterpriseSearchTopology -SearchApplication $ssa -Clone –SearchTopology $active
  3. Get QueryProcessingComponent ComponentId by run command
    Get-SPEnterpriseSearchComponent -SearchTopology $clone
    Get component Id as Figure
  4. Remove the component by using the ComponentId
    Remove-SPEnterpriseSearchComponent -Identity 1c138785-382e-45f3-8e55-ee8d189cf1c0 -SearchTopology $clone -confirm:$false
  5. Add new Search component using command:
    $wfe = Get-SPEnterpriseSearchServiceInstance -Identity "Web front name"
    New-SPEnterpriseSearchQueryProcessingComponent -SearchTopology $clone -SearchServiceInstance $wfe
  6. Activate search component
    Set-SPEnterpriseSearchTopology -Identity $clone

After this step error disappear and search topology does not generate error and I succeed crawling.










Monday, April 29, 2013

Cannot delete Column from List

When tried to delete some columns from list using GUI, Some of them don't give me option to delete.
Problem: I Can't delete column if it is sealed, hidden, or readonly
Solution: Change values of these properties to false before trying to delete

You can use PowerShell to change these properties and remove column from List like below:
$web = Get-SPWeb -identity SiteUrl
$list = $web.Lists[listName]
$column = $list.Fields[FieldName]
$column.Sealed = $false
$column.Hidden = $false
$column.ReadOnlyField = $false
$column.Update()
$list.Fields.Delete($column)

Thursday, April 25, 2013

SharePoint Variation Labels error

When tried to access Variation Label on SharePoint I faced error:

Field not found: Label

After investigation, I found article solved my problem:
http://blogs.perficient.com/microsoft/2012/12/variation-labels-broken/

Problem is some one in team changed Display Name of Label Field to Title. variationlabels.aspx page looks reads the item data based on the display name of the field. To solve problem Goto Variation Labels List and Change Title Field to Label and problem will be solved.