Tuesday, 23 October 2012

The operating system returned error 21

The operating system returned error 21 (failed to retrieve text for this error. Reason: 15105) to SQL Server during a read at offset 0x00000000156000 in file 'D:\Data\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online. (Microsoft SQL Server, Error: 823)

I got this error on the secondary database server which wasn’t in use thankfully. We had an issue with our SAN and as a result, the system database Master got corrupted when SAN came back.

After performing the following steps, my issue was resolved.

·         Start > Control Panel > Program and Features
·         Select SQL Server 2008 R2 (64 bit)
·         Click on Uninstall/Change
·         I selected Repair Option and followed the on-screen instructions.

Thankfully issue was resolved but I would suggest before you run this make sure you have good backups in place.

There is a brilliant article from Microsoft which talks about this at great length but I preferred the above approach as it didn’t have any other databases but if you’ve any other non-system database follow these steps here

Tuesday, 9 October 2012

Create and Configure User Profile Service Application in SharePoint 2013

In this article, we will go through the steps of creating and configuring the User Profile Service Application and will setup a synchronization connection in SharePoint 2013.

Navigate to Central Administration page, Click on Manage Service Application

Click on New from the Ribbon bar and Select User Profile Service Application
Provide the following details:
  • Name
  • Application Pool Name
  • Service Account: farm but change it to a service account later after creation
  • Database Server Name: 
  • My Site Host URL:
  • My Site Managed path:
  • Site Naming Format:

Click on Ok  to Provision the Service Application

Start the following Service

  • User Profile Service
  • User Profile Synchronization Service


To configure a synchronization connection, Click on Configure Synchronization Connections

Click on Create New Connection 
Enter the Sync Connection Name
Select Active Directory
Enter the Domain Controller Name
Select the Authentication Provider as Windows Authentication
Enter the Service Account details
Note: This account should have Read Delegation rights on Active Directory Domain Controller

Click on Populate Containers
Select the Containers where you have got users.

Click Ok

Now run a Full Synchronization

 It has imported around 2567 user accounts