How to fix “SharePointDiagnostics” event ID 2

I tried to view health reports and got the error. After some ULS review I was able to resolve it fairly easily.

Event ID 2:Session “SharePointDiagnostics” failed to start with the following error: 0xC0000035

Note: It is allowed to customize the schema of Usage Database.

Central administration à Monitoring à View Health Reports à Click Go

Fix Procedure

  1. Login to SQL Server à Connect to SQL Server Management Studio
  2. Expand Databases
  3. Expand XX_Usage
    à Programmability à Stored Procedures

Find proc_GetSlowestPages stored procedure and commenting out the WITH (READPAST) line.

  1. Comment Out WITH (READPAST) (Just two dashes)

  1. Click Execute. Messages window will show command completed successfully.
  2. Close SQL Server management Studio.
  3. Go back to Health Reports and refresh the page.
  4. Click Go

Issue is now fixed J













Reducing Tim to Install Cumulative Updates and Service Packs

I was involved in deploying SharePoint 2013 cumulative updates and service packs in our customer environment packs and it was taking very long time for us to complete the installations. We provide a Cloud Based SharePoint 2013 Environments which have very large number of servers as well as extended search topologies which make the process to complete in even more time. I had made my own process which include stopping SharePoint Server Search, Search Controller and Timer service manually or with PowerShell before running the CU but still it was not good. So after some research I was able to find out a way to do it faster. This may not be new to you but I have been using it from last 10 months or so I documented it below.

I found this great post from Russ Maxwell that
had this great script that can automated the whole process.

  1. I copied the script from there and put into a PS1 file.
  2. Download the Cumulative Update in the same folder as PowerShell script and then copy the folder to all SharePoint Servers.

  1. Before you go to step 3 Open Central Administration and Go to Manage Service Application à Search Service Application
  2. Open PowerShell as Administrator
  3. Switch to CU and PowerShell folder
  4. Now I always start from the Central Administration server but you can start from any other server.

  1. Press 1 and Enter

If you refresh Search Center you will see that Search service application is paused.

Note: I have seen that some time script take very long time to go to next time. To save time the tip is that you can press Control C and then start again with 2. Just verify that Search service application is paused.

  1. Now Login to other server and Repeat the same process with Option
    “2” now wait for installation process to complete on all servers.
  2. Once the service application will be paused it will automatically stop the services and start the installation of CU.

  1. Make sure the installation is complete on all server.
  2. Go to any server in the Farm and In the same PowerShell Window type the following

psconfig -cmd upgrade -inplace b2b –force -wait

Note (STS Error message is on last page):

To Avoid STS Error after running the wizard.

When PSConfig reach step 2. Do IISRESET on another command prompt.

  1. If you upgrade failed with error you can check in two placed
    1. DateTime-UpgradeError.log : that contains the main error for your upgrade to fail + any warnings.
    2. Detailed Upgrade-DateTime.log that contains verbose logs of the whole upgrade process.
  2. What kind of issues I have encountered.
    1. Missing Features that I have to remove suing Feature Admin from CodePlex
    2. Orphan Sites and Webs
  3. It is not required but you can Now Run SharePoint Configuration Wizard and then click Next, Next, Finish

  1. Upgrade and Migration à Review Database Status à make sure all databases are no action required.
  2. I have seen that mostly BDC Database goes into compatibility Range. Following my Blog here to fix that.

  1. Upgrade and Migration à Check Product and Patch installation status à Your KB must be listed.

Login to SQL Server à Open SQL Server Management Studio à Click Connect

Expand Databases à Expand SharePoint Configuration or any Content Databases à Expand Tables

Right click on Versions à View Top 10

Verify the version against Todd Klindt’s



Creating SharePoint 2013 Farms on Windows Azure

Windows Azure

Microsoft Azure (formerly Windows Azure before March 25, 2014) is a cloud computing platform and infrastructure, created by Microsoft, for building, deploying and managing applications and services through a global network of Microsoft-managed datacenters.

To find more please visit

For free training please check Azure Training Kit and the Microsoft Virtual Academy.

MSDN and Windows Azure Subscription

A Windows azure subscription is required. There are two options for you to get it.

  • Use a Trial Account
  • Use your company provide MSDN Account.

Getting a company provided MSDN Subscription with activating Windows Azure

  1. Request to request your official MSDN Subscription
  2. You will get confirmation email in 2 to 3 days that your account has will get subscription email with a link to activate your subscription.

  1. Once activated click on My Account à Activate Windows Azure

Fill up the farm and validate your account by Text or call me. It will take couple of minutes for this process to complete.


Windows Azure Trial

  1. While you wait for the Company provided MSDN you can still get a trail to perform this testing. You need to go to
  2. Click Try it now.
  3. You have to login with your Microsoft Live account.
  4. Enter your information and verify that you are a human using SMS or Call me J

Logging into Windows Azure Portal

There are two portals for Windows Azure.

Traditional Portal

Preview Portal

This is a the traditional portal that provides access to Windows Azure objects. Please note that understanding or core services is required to use this portal.

This preview portal is more automated and User interface has been enhanced to provide more control over your cloud based environments but allow you to configure things quickly without going to small details.

Note: For this lab we will be using the preview portal.

SharePoint Farm Types

There are two options to create the SharePoint Farm.

  1. A basic two tier SharePoint 2013 farm
    1. Single SharePoint Server
    2. Single SQL Server
    3. Single Domain Controller

  1. Highly available SharePoint Farm.
    1. 2 SharePoint WFEs
    2. 2 SharePoint APP Servers
    3. 2 SQL (Extra SQL for Always-on Availability)
    4. 2 Domain Controllers

Let’s create the highly available farm first then we can delete and create the small farm topology. If you want to create a small farm please skip this and go to Creating Small farm.

Creating a Highly Available Farm

Click on New Button with

We need to have naming convention for this Farm.

Resource Group

Resource Group

HPSP2013HAVFarm-(Your HP Initials)

User Name

Unique and must not be common




Highly Available

Enabled High availability must be set

Domain Controllers

Scroll down and click on Domain Controllers.

Host Name Prefix

Set to Unique name. I am using –DC Next to my Host name prefix for better understanding. You can leave it as is if you want.

Forest Root Domain

Enter any name of your choice. I used

Pricing Tier

Click on Standard A1 to see the description of server used for this server. Click “SELECT”

Click OK in domain Controllers Section

Configuring SQL Servers

  1. Enter Host Name prefix e.g. HPSQL14-HA (Must be Unique). You can leave it as is if you want.
  1. Click Pricinging Tier if you want to change the server types.
    1. You can use the same password as administrator or your new. You can also change the service account for SQL Server.

  1. Click OK

Configuring SharePoint Servers

  1. Enter a unique Host name prefix.
    1. Enter setup user account e.g. svc_spadmin_01
    2. Enter Farm Account as svc_spfarm_01
    3. Leave the use the administrator password checked.

  1. Click OK.

Review Virtual Network, Storage, diagnostic area.

I do not recommend making any changes here as you are creating a test farm.

Click OK.


Choose the location that is nearest to your environment. I am in eastern US so I am choosing it.

Click OK.

Click Create

This process can take around 1 to 2 hours as Windows Azure will Provision all these servers for you. To see the actual progress if you open the Triditional Azure Portal you will see something like this.

Once the process is complete. You will see the following on the home of Azure Portal. Click on the Icon to see description.

To find details of Servers and other services involved click on Resources Icon on top of the page.

To Access Central Administration and Root Site collection created for you Click on Deployment History à Microsoft.SharePointFarm

Copy the Central Administration Url and paste it in browser

Please note that the farm will not have any service application.

Opening the Site Collection

Copy the Site Collection Url and paste it browser window.


Enter the Setup User

Choose Team Site and Click OK.


Site Collection will be created in few minutes

Click OK on Setup Group Page

If you want to Login to a Virtual Machine using Remote Desktop for better performance and easy access to SharePoint Resource.

Click on Virtual Machine à Then Click on the VM you want to Connection

Click On Connection from Left Top of the VM


Press Windows Button and type “SharePoint” and Click on SharePoint Central Administration

Click on Manage Servers in the Farm Once Central Administration Shows up.

VM Also got internet so you can download anything and practice.

The response time for opening site collection on the server will also be very quick on the Remote Desktop.

Deleting the Highly Avaiable Farm

As you do not want your 150 USD Credit to Finish faster you can delete the Farm after testing. Simply Click Farm Name and then Click Delete from top Link. The farm and all its services will be delete automatically. (Leaving Farm running will charge you)

Now For Confirmation you have to type the Resource Group Name

Click Delete

Notification area will show the link

Creating a Small Farm

  1. Click New à SharePoint Server Farm
    1. Enter Resource Group name
    2. Enter User Name and password.
    3. DO NOT Check Enable High Availability

Click on Domain Controllers

Enter Forest Root Domain Name

Click OK.

Click on SQL Server

Change anything if needed.

Click On SharePoint Servers and Change anything if required.

Click OK.

Change Location to your preffered location.

Leave all cofiguration as default. Click Create.

You could see that my two farms are now being provisioned. I will check back in 1 hour to see the status.

Notification aread will show successed once done.

Go to Page 14 to read about how to connect to your Site Collection and Central Administration.

BDC Database in Compatibility range after SharePoint 2013 SP1

I installed SharePoint Server 2013 SP1 today on RTM based environment.

  1. I ran psconfig -cmd upgrade -inplace b2b –force on every server in the farm. Then ran the configuration Wizard
  2. I saw that my BDC DB was still in Compatibility mode. Below PowerShell script fixed it.

(Get-SPDatabase | ?{$_.type -eq “Microsoft.SharePoint.BusinessData.SharedService.BdcServiceDatabase”}).Provision()


Check Product Version

SharePoint 2013

Central Administration à Upgrade and Migration à Check Product and patch installation status

Office Web Apps

Open PowerShell as Administrator on Office Web Apps Server


For Version Comparison

SharePoint 2013 Build Numbers by Todd Klindt

Installing SharePoint 2013 on Windows Server 2012 R2

I am setting up this 2012 R2 VM while watching Keynote of SharePoint Conference 2014. Here is what I did.

I created a New VM on Windows 8.1 and choose Generation 2 vhd.

Attached the ISO. Gave key and installed the OS. First thing that happened is the dialog below when I logged in.

It asked me to select the resolution J Awesome.

All the prerequisites installed successfully.








Good 2010 Search Stuff

SharePoint 2010: Search Windows PowerShell cmdlets

Estimate performance and capacity requirements for SharePoint Server 2010 Search

Plan for crawling and federation (SharePoint Server 2010)