Wednesday, April 8, 2015

Event ID 6398 and 5586 : Could not find stored procedure 'dbo.Search_GetRecentStats'.

Issue Description

On checking the SharePoint server event viewer, I was seeing the below errors every minute.

Event 6398
The Execute method of job definition Microsoft.Office.Server.Search.Monitoring.HealthStatUpdateJobDefinition (ID 67ac9b25-4559-4847-849f-16f05cee73c9) threw an exception. More information is included below.
Could not find stored procedure 'dbo.Search_GetRecentStats'.



Event 5586
Unknown SQL Exception 2812 occurred. Additional error information from SQL Server is included below.
Could not find stored procedure 'dbo.Search_GetRecentStats'.



Fix

Go to Central Administration -> Monitoring -> Configure usage and health data collection -> Enable health data collection

Tuesday, April 7, 2015

Backup a SharePoint Site

Backup SharePoint Site
Backup-SPSite http://sitename -Path E:\Backup\site_name.bak

NAME
    Backup-SPSite

SYNOPSIS
    Performs a backup of a site collection.

SYNTAX
    Backup-SPSite [-Identity] <SPSitePipeBind> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-NoSiteLock <SwitchParameter>] [-UseSqlSnapshot <SwitchParameter>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

DESCRIPTION

The Backup-SPSite cmdlet performs a backup of the site collection when the Identity parameter is used. By default, the site collection will be set to read-only for the duration of the backup to reduce the potential for user activity during the backup operation to corrupt the backup. 

Restore a SharePoint site to a specific database

Restore a SharePoint site
Restore-SPSite http://sitename -Path "E:\Backup\file.bak" -Force

Restore a SharePoint site to a specific database

Restore-SPSite http://sitename -Path "E:\Backup\file.bak" -Force -DatabaseName "Database"

NAME
    Restore-SPSite

SYNOPSIS
    Restores a site collection.

SYNTAX
  Restore-SPSite [-Identity] <String> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-ContentDatabase <SPContentDatabasePipeBind>] [-Force <SwitchParameter>] [-GradualDelete <SwitchParameter>] [-HostHeaderWebApplication <String>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

Restore-SPSite [-Identity] <String> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DatabaseName <String>] [-DatabaseServer <String>] [-Force <SwitchParameter>] [-GradualDelete<SwitchParameter>] [-HostHeaderWebApplication <String>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

DESCRIPTION

The Restore-SPSite cmdlet performs a restoration of the site collection to a location specified by the Identity parameter. A content database may only contain one copy of a site collection. If a site collection is backed up and restored to a different URL location within the same Web application, an additional content database must be available to hold the restored copy of the site collection.

SharePoint Solution deployment stuck on deploying

Problem description

I was deploying the solution in our production environment and faced some strange issue.The status never changes from deploying.

Fix

1.  Log on to all the SharePoint servers in the farm -> Start -> Run -> services.msc 


2.   Check for SharePoint Timer service and make sure it’s in started mode. (This service should be started on all the web servers  as well as application server)

How to Remove a site collection Normally and Forcefully

To Remove a site collection Normally

Remove-SPSite "http://sitename/"

Apparently, the Remove-SPSite cmdlet cannot delete a site collection which is not fully provisioned, and this cmdlet doesn’t have a force flag.

To forcefully delete a site collection, use the SPContentDatabase.ForceDeleteSite method

$siteUrl = "http://sitename/"
$site = get-spsite $siteUrl
$siteId = $site.Id
$siteDatabase = $site.ContentDatabase
$siteDatabase.ForceDeleteSite($siteId, $false, $false)

Wednesday, March 25, 2015

For more information about this error navigate to the report server on the local server machine, or enable remote errors

Issue Description

I was getting the below error on a SharePoint page which had SQL Server Reporting Services Report Viewer web part on it
For more information about this error navigate to the report server on the local server machine, or enable remote errors

Fix

Enable Remote Errors for a SharePoint Site

1. In Site Actions click Site Settings for the site you want to modify.
2. Click Reporting Services Site Settings in the Reporting Services group.
3. Click Enable remote errors in local mode.
4. Click OK.

Thursday, March 12, 2015

SharePoint 2010 and Co-Authoring

Co-authoring simplifies collaboration by enabling multiple users to work productively on the same document without intruding on one another’s work or locking one another out. This functionality requires no additional server setup and is the default state for documents stored in SharePoint 2010.

Co-authoring is easy to use from the end user’s point of view. When a user wants to work on a document in Word 2010, PowerPoint 2010, or OneNote 2010, he or she merely opens it from SharePoint , as usual. If another user already has the document open, both users are able to edit the document at the same time; access to the document is not blocked and no error appears
In Word 2010 and PowerPoint 2010, saving to a document notifies other users viewing the document that there are new edits. Those users can refresh their view immediately to see those changes or continue their work and refresh later to see the latest edits. The authors can also see one another’s work, and everyone knows who is working on the document. SharePoint 2010 versioning and tracking tools protect the document so that authors can roll back unwanted changes.

Note:
  • When a user checks out a document for editing, this locks the document for editing to only that user, which prevents co-authoring. Require Check Out should not be enabled in document libraries where co-authoring will be used. By default, Require Check Out is not enabled in SharePoint 2010. Users should not check out documents manually when co-authoring is being used.
  • To collaborate best in PowerPoint and Word, we recommend that all users work with Office 2010


How to do this
1 Open document from SharePoint

2. Open from local client - > Edit

3. Enter your credentials

And start making changes..








Tuesday, March 10, 2015

SharePoint 2010 User Profile Synchronization connection missing

Issue Description

Last week, while I was checking the User Profile Settings in my Sharepoint 2010 farm and I noticed that on browsing to

User Profile Service Application -> Synchronization -> Configure Synchronization Connections 
-> My Synchronization Connection was empty.

I swear I have that it was always there, but below is the error message I saw

The query returns nothing.



Resolution

1. Go to Run -> services.msc

2. I checked for the service Forefront Identity Manager Services. It was not in Started state



3. Right click and Start it.



This should fix the issue.The Synchronization Connection should show up now


Monday, March 2, 2015

List of all SharePoint custom solutions and deployed web applications in the farm

      I was working on getting all the custom solutions in the farm. This could be obtained from the Central Administration. (Central Administration -> System Settings -> Manage farm solutions)

I wanted this list of solutions and also the web applications where they were deployed. I worked with a friend and came up with a PowerShell script to do this. This will definitely save you some time.

PowerShell Script

$File = "E:\SolutionandDeployedWebApplications.txt"
foreach ($solution in Get-SPsolution)
{
echo $solution.Name | Out-File $File -Append
echo $solution.DeployedWebApplications | Format-Table -Property Url | Out-File $File -Append

}

Friday, February 27, 2015

SharePoint Farm Solution Details

Below is a set of PowerShell commands and stsadm command to get the solution details in the farm.

1. To list all the solutions - Returns solution name, id and deployed status

Get-SPSolution

2. To list all the properties of a particular solution

Get-SPSolution –identity solutionname.wsp | select *

3. List all solutions, properties and output to a file to read

Get-SPSolution | select * > E:\SolutionDetails.txt

4. List all solutions, properties and output to a file to read (using ststadm)

stsadm.exe -o enumsolutions > E:\SolutionDetails.txt