Sunday, June 30, 2013

Overview Profiling SharePoint Applications Performance

The profiling feature use to identify the code and all various elements that causes to slow SharePoint applications performance. Profiling feature observes & records the performance behavior of SharePoint application. Profiling eliminates the problems that cause to slow SharePoint applications performance such as memory allocation issues, bottlenecks, inefficient code etc. Visual Studio provides several profiling tools in the integrated development environment to identify SharePoint application performance issues.   
Profiling Methods
Profiling Tools use five methods to collect SharePoint applications performance data. Here is the overview of five methods:  

When you run profiling feature, it has very less impact on the application methods execution. Sampling profiling method collects statistical data that is performed by an SharePoint application.  
It is set as a default in Microsoft Visual Studio Premium Profiling Tools. Here are all advantages of this method:
  • Initial explorations of SharePoint Application Performance
  • Investigating SharePoint Application performance issues that affect the utilization of the processor.

This method interrupts the computer processor at the set time intervals and collects the function call stack. 
This method covers two parts- First is Exclusive sample counts that are incremented for the executing function & the second is inclusive counts that are incremented for all function call stack. 
Sampling Profiling reports covers these counts total for the profiled module, function etc.

The instrumentation profiling method collects function timing calls in a profiled SharePoint application. Here are all advantages of this method:
  • Investigating input/output bottlenecks  
  • Examination of a particular module 
  • Examination of set of functions

The instrumentation method collects function timing information in the instrumented file by injecting code in a binary file.  Instrumentation reports cover four values to represent the total function timing: 
Elapsed Inclusive - The total spent time on function execution. 
Application Inclusive - The total spent time on function execution. but exclude OS calls time. 
Elapsed Exclusive - The total spent time on code execution in the body of the function.  But exclude the total spent time on functions execution called by the function.
Application Exclusive - The total spent time on code execution in the body of the function. But exclude the total spent time on functions execution & executing calls to the operating system called by the function.

Concurrency profiling collects multithreaded applications information & also about how your multithreaded application interacts with the hardware & the OS. Concurrency reports cover two values such as: 
  • Resource contention reports show total number of contentions and the total waiting time for a resource for the modules, functions, source code lines, and instructions.  
  • The concurrency visualizer displays graphical information to locate performance bottlenecks, CPU underutilization, areas of overlapped I/O, and many other information. 

The .NET memory allocation profiling method interrupts the processor at each allocation of a .NET Framework object in a profiled application. It collects the information about the type, size, and number of objects that were created in an allocation. 
  • This profiler collects the additional information about the function call stack after an allocation event occurs. This method covers two parts- First is Exclusive allocation counts that are incremented for currently executing function. Second is inclusive counts that are incremented for all function call stack . 

.NET reports cover the totals of these counts for the profiled types, modules, functions, source code lines, and instructions. 
  • This profiler collects information about destroyed objects data and information about the objects in each garbage collection generation when a garbage collection occurs. Then the profiler records objects data that were not explicitly destroyed. 

The Object Lifetime report displays the totals for each type that was allocated in the profiling run.
We can use this method in both sampling and instrumentation mode. The Allocation and Object Lifetime reports should be same even you will select any mode: 

After running .NET memory profiling in sampling mode the profiler .NET uses memory allocation events as the interval. 
In the reports, it shows the number of allocated objects & the total allocated bytes with the inclusive and exclusive values. 

After running .NET memory profiling in instrumentation mode, all detailed timing information is collected together with the inclusive and exclusive allocation values.

Tier-interaction profiling method collects information about synchronous ADO.NET calls between an ASP.NET page and a SQL Server database to a profiling data file. This data covers the number and time of calls, and the max & min times.  
When you completed running a profile analysis on your application then a report provides detailed information about the application performance that I have already mentioned in all methods. Let take a detailed overview about reporting. 

More About Profiling Tools Report:
You can view, analyze and manage SharePoint application performance issues in Performance Report windows.  
You can view your data in various formats. You can check each view on the main toolbar of the Performance Report window. For this click the arrow next to the Current View to check the individual views. 

Here is the list of data views:
Summary View: In this view, profiling data is displayed in the Summary view. 
Caller View:  In this view, profiling data is displayed in the call tree for a single function. It covers three points: Target Function, function called by callers & the function called by callees. 
Call Tree View: In this view, profiling data is displayed function execution paths. 
Process View: In this view, profiling data is displayed performance data for each process. 
Modules View: In this view, profiling data is displayed for each module.
Functions View: In this view, you can view lists of the functions. 
Line View: In this view, profiling data is displayed in the specific source code lines. 
Instruction Pointer View: In this view, you can view the specific instructions.                           
Allocation View: In this view, you can view the lists of .NET objects that were allocated by the application.
Objects Life Time View: In this view, you can view the total number of instances of each type. 

You can easily use this feature to fast your SharePoint applications performance & can easily identify code and other elements that are affecting your SharePoint application performance.

Friday, May 31, 2013

How to create web application & site collection in SharePoint 2013

Before creating a site collection, you must first create a Web application because site collections reside in a web application. Here is the full structure of SharePoint site collection:

You can see in structure that a site collection is the collection of one top-level site and sub sites. All content of a site collection stored in a single content database. You can clearly see the figure that the top level of organization is web application. Web applications also need at least one content database to store all data. Now let’s move the steps to create a web application in SharePoint 2013:

Create web application:

SharePoint 2013 Central Administration > Application Management page

To create a new web application, click on manage web application

After that click on new button

After that you will see that the page is about to load.

After the page is load, you will see “Create New Web Application”  dialog window:

When you scroll down the this dialog windows, you will see various settings like:

  • Allow Anonymous- NO
  • Use SSL- NO
  • Check Enable Windows Authentication Check Box
  • Check Default Sign in Page
  • Check Create new application pool
  • Enable Customer Experience Improvement Program: Yes

After applying above settings, click on Register new managed account & you will see following window:

After that click on OK, Next window will come like this:

After loading, this windows will come & confirm that you web application is about to create.

Click on Ok to successfully create a web application.

Here is the first look of your new created web application which is listed in SharePoint Central Administration Web Application under Central Administration > Application Management > Manage web applications

You can also delete a web application if needed; go to Central Administration’s Application Management page. Under the SharePoint Web Application Management section, click Delete Web application. This case comes when you are unable to access your site collection and web application. It happens when the web application get corrupted and unusable. In this case, you could be forced to delete the web application or you have use third party SharePoint Recovery Software to successfully repair your inaccessible web application. Check this presentation to know more about SharePoint Recovery Software:

If you have accidentally deleted your web app & you want to restore it then you have restore all content databases and site collections in the farm.

Create Content Database:

Before creating a site collection, first create a content database:

From Central administration screen and under "Application Management" click on Manage Content Database

After that click "Add a Content database"

If you create a new site collection then you need a particular Content Database to store it. Before creating site collection, you must check that the status of each content database is set to stop. You only need to start content database that is required.

click on all Database names and change Database status from ready to offline & click ok.

After creating & managing the content database, you can create site collection. Now let’s move the steps to create a site collection in SharePoint 2013:

Create Site Collection:

Click on Central Administration > Application Management > Create Site Collections

First select the web application in which you want to create a site collection.

Mention the title and description for your site.

After that select the template according to your need such as Collaboration, Meetings, Enterprise, Publishing & Custom.

Click ok.

You can see your created site collection by clicking "Application Management" from central admin. Click on "View All site collections" under Site collections section.

Here is list of Site Collections:

Here is the first look of your site collection:

If you want to delete the site collection, you can do it by following steps:

  • Start SharePoint 2013 Central Administration
  • On the start screen click on SharePoint 2013 Central Administration.
  • On the Central Administration website>>click Application Management.
  • In the Site Collections section, click on the Application Management page then click Delete a site collection.
  • On the Delete Site Collection page>>click Change Site Collection.
  • Now you will see Select Site Collection dialog box.
  • In the Web Application list>>click Change Web Application.
  • Now you will see Select Web Application dialog box.
  • After that Click the name of the web application which contains the site collection that you want to delete.  
  • Click the relative URL of the site collection that you want to delete, and then click OK.
  • Verify that the site collection information is correct or not.
  • On the Delete Site Collection page, click Delete.
  • After that site collection will get successfully deleted. 

If you want to restore deleted site collection, you can do it by using Restore-SPDeletedSite Windows PowerShell cmdlet. Because when a site collection is deleted, it stored in the SPDeletedSite object.

After creating the site collection, you can create sub sites. Now lets move the steps to create a sub sites in SharePoint 2013:

Create Sub Site:

This site will create under site collection. For this click on Settings button and then select Site Contents option & then click on Site Contents page.

After that Click on new subsite link.

Mention the site title, description, web site address & then select the Template for your subsite. Also set the permissions and navigations according to your need. After that Click on Create button to start creating a new subsite

Now you will see that your sub site has been created.

Congratulation, you have successfully created your web application, site collection and subsites.

Tuesday, April 30, 2013

How to upgrade SharePoint 2010 to SharePoint 2013

As clearly indicates in the figure, SharePoint 2013 up gradation divided in to five stages: 

First Stage: Create SharePoint 2013 Farm: 

As shown in the figure, first install SharePoint 2013 to a new farm and then set the SharePoint 2010 farm to read-only. 

Second Stage: Copy Databases to New Farm: 

Use SQL Server Management Studio to copy databases to a new farm. First set the databases to read-only mode and then back up the content and service application databases from the SQL Server instance to SharePoint 2010 Products farm. After that restore content and service application databases copy to the SQL Server instance on the SharePoint 2013 farm and then set the databases to read-write on the new SharePoint Server farm.

Third Stage: Upgrade SharePoint Service Applications: 

In this stage, first configures the SharePoint service applications for the new farm. As clearly shown in the figure, create a web application on the SharePoint 2013 farm with same urls & port numbers for each SharePoint 2010 web application. 

After that installs all server-side customization just like shown in figure.

Fourth Stage: Upgrade Content Databases: 

After completing the all above process, attach the content databases to the new farm and then upgrades the content databases for those web applications.  

Fifth Stage: Upgrade Site Collections:

In the final stage, upgrade site collections. In this stage, first we have to upgrade My Sites & then to upgrade Products site collections. 

'My Sites' are upgraded by the site owners & covers four stages process which is clearly indicate in the figure:

If you are a site owner & get the upgrade notification on your site's home page about new version availability then start upgrade your sites as soon as possible. Site collection up gradation divided in to four stages which are clearly shown in the figure:

Hope the article will help you to upgrade SharePoint 2010 to SharePoint 2013.

Tuesday, April 9, 2013

Mobile devices in SharePoint 2013

SharePoint Server 2013 offers many new advanced mobile device features for different mobile platforms. Some are including the mobile browser experience, device channels, Office web apps, location, Push notifications, Business intelligence content, subscribe to mobile alerts. Let’s elaborate these points one by one: 

1. Mobile browser experience

SharePoint Server 2013 offers three views according to your mobile browser to improve the mobile browser experience:
Classic view: This view present in HTML format & provides compatibility for mobile browsers that failed to present in the new contemporary view.  

Contemporary view: This view present in HTML5 & offers an optimized mobile browser experience to users. This view is available for Mobile Internet Explorer version 9.0 or later versions for Windows Phone 7.5, Safari version 4.0 or later versions for iPhone iOS 5.0 and the Android browser for Android 4.0 or later versions. Here are some advanced features of contemporary view: 

Menu button Check: Right side of the title area of the contemporary view. This includes the following features:
  • View Site Contents used to view all of the site content on the SharePoint site including lists and document libraries.
  • Sign Out used to log out from SharePoint.  
  • Close used to closes the Command button menu and get back to the SharePoint site.
Switch to PC View: This view used to display from mobile browser view to a full desktop view of a site. This view is present in both contemporary and classic views in SharePoint Server 2013.  

Navigation window: Check left side of the title area of the contemporary view. This navigation window presents a single menu with breadcrumbs, top navigation, and quick launch navigation from the full desktop view of the site. 

Tap-to-open links: As name indicates, it displays text or icons on a wide strip that is easier for a user to tap.

Pagination: Lists with more than 20 items are automatically paginated.

New and edit functionality: You can create a new list items and edit them in the contemporary view. 

Full-screen UI: You can see full desktop view of a SharePoint site on a Smartphone device.

2. Device Channels: 

In Oldest versions of SharePoint Server, there was a single default mobile view that was auto-generated based on the existing site. Device channels in SharePoint Server 2013 used to present a single site in multiple ways by using different designs on different mobile devices such as Smartphone, tablets etc. 

3. Office web apps:

In older version of SharePoint , Office Mobile Web Apps used to open documents in the mobile web application by using a mobile browser. When Office Web Apps Server is installed on Older version of SharePoint Server , Office Mobile Web Apps is also get installed on the server. 

In SharePoint Server 2013, Office Web Apps Server is a new stand-alone server product that provides mobile browser-based viewers for Word, Excel, PowerPoint etc named as Word Mobile Viewer, Excel Mobile Viewer, and PowerPoint Mobile Viewer. 

4. Location:

SharePoint Server 2013 offers geolocation field type that can be used in a list. 

5. Push notifications:

To receive notifications from a SharePoint site to mobile devices, device applications must be register with a SharePoint site. After register, you can write event handler code to interact with Microsoft Push Notification Service of other mobile device platforms. Notifications can be any type like events on the site etc. 

6. Business intelligence content:

This features of SharePoint Server 2013 used to view certain kinds of dashboard content.  

7. Subscribe to mobile alerts:

This feature enable users to subscribe the alerts that are sent by using Short Message Service. These alerts are sent to the mobile device when the changes are made to a SharePoint list or item.  

Tuesday, March 26, 2013

SharePoint 2013 Backup and Recovery cmdlets

Whatever is the theme of your business, your full business depends on your data & if you lost your data, it can interrupt your whole business continuity. So if you don't want to OUT OF the MARKET then you should plan for proactive backup and recovery policies for your data. There are so many reasons of data corruption and not all are easily fixed. Here is the survey of data loss reasons: 

But one of the famous & working approach to keep your data safe is 'BACKUP'. SharePoint 2013 is also introduced Backup and recovery cmdlets which will help you to backup & recover your corrupt SharePoint Server. You can use this SharePoint 2013 functionality to backup & restore various SharePoint items such as Farm, Site collection, Configuration database, Services, document etc. 

Let’s have a look of all cmdlets one by one: 


This cmdlet used to perform either configuration-only backup of the current farm or a configuration-only backup of a separate configuration database which is not attached to the current farm. If you wish to perform a configuration-only backup of the current farm. Here is command: 

Backup-SPConfigurationDatabase -Directory <String> [-AssignmentCollection <SPAssignmentCollection>] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-Item <String>]


Backup-SPConfigurationDatabase -ShowTree <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>] [-DatabaseCredentials <PSCredential>] [-DatabaseName <String>] [-DatabaseServer <String>] [-Item <String>]


This cmdlet used to create entire farm backup or individual components within the farm. Here is command: 

Backup-SPFarm -BackupMethod <String> -Directory <String> [-AssignmentCollection <SPAssignmentCollection>] [-BackupThreads <Int32>] [-ConfigurationOnly <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-Item <String>] [-Percentage <Int32>] [-WhatIf [<SwitchParameter>]]


Backup-SPFarm -ShowTree <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>] [-ConfigurationOnly <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-Item <String>] [-WhatIf [<SwitchParameter>]]


This cmdlet used to restore one or more items (individual database, Web application, or the entire farm) from the backup. Here is command: 

Restore-SPFarm -Directory <String> -RestoreMethod <String> [-AssignmentCollection <SPAssignmentCollection>] [-BackupId <Guid>] [-ConfigurationOnly <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-FarmCredentials <PSCredential>] [-Force <SwitchParameter>] [-Item <String>] [-NewDatabaseServer <String>] [-Percentage <Int32>] [-RestoreThreads <Int32>] [-WhatIf [<SwitchParameter>]]


Restore-SPFarm -Directory <String> -ShowTree <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>] [-BackupId <Guid>] [-ConfigurationOnly <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-Item <String>] [-WhatIf [<SwitchParameter>]]


This cmdlet used to perform site collection backup when the 'Identity' parameter is used. Here is command: 

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


This cmdlet used to restore a site collection to a location specified by the 'Identity' parameter. Here is command: 

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


This cmdlet used to track the history of backup and restore operations that have been completed. Here is command: 

Get-SPBackupHistory -Directory <String> [-AssignmentCollection <SPAssignmentCollection>] [-ShowBackup <SwitchParameter>] [-ShowRestore <SwitchParameter>]

If your Backup is Not Good Enough to perform Restoration then WHAT?

If your backup is not well structured then it will not help you to recover your data at any cost. In this case, you have one another solution to repair your corrupt SharePoint database that is SharePoint Server Recovery Tool. These software help users to repair corrupt SharePoint database in all corruption cases. 

A good backup is an excellent approach to prevent data loss & repair database in most of the data corruption cases. 

Thursday, March 21, 2013

Welcome to SharePoint 2013 Apps

Apps are mini applications which you can use to enlarge the performance of SharePoint Server. Here is the full overview of SharePoint Apps Store

In these apps, some are featured & some are free. Here are some SharePoint Apps Examples:  

Action Trackers:  You can use this app to assign tasks & Items, to your colleagues and also track them.

myFAQ App: This app used to create a list of frequently asked  questions for the users on SharePoint site.

Facebook Integration: You can use this app to use Facebook social plugins on your public website.

Social Squared Beta: This app used to build a community around your SharePoint sites

Only a Site owner can be add SharePoint apps to the site. After adding a SharePoint app to the site, a subweb of that site is created to host the SharePoint app content. These apps run in their own app domain then to host apps, you will have to configure DNS in your environment. 

How to host SharePoint Apps:

There are two options to host your apps: 

1.You can choose your app domain as a subdomain of the domain that hosts the SharePoint environment.

2.You can create a new domain for your apps.

For OPTION 1: 

First Click on Start>>Administrative Tools>>DNS

Right click “Forward Lookup Zones” and select “New Zone”>>Next.

Keep the default and click “Next” again & then again click on 'Next'.

Specify the zone name.  

Click “Next”. 

Then Next & Finish. 

Right click on your new zone and select “New Alias (CNAME)…”

Give Alias name & Click to “Browse”

Double click on your server name

Double click “Forward Lookup Zones”

Double click the domain of your SharePoint environment.

Select “(Same as parent folder)” and click “OK”

Click “OK”.

Now the setting of DNS is get complete. 

For OPTION 2: 

First Click on Start>>Administrative Tools>>DNS

Right click on your domain name and select “New Alias (CNAME)…”

Give Alias name & Click to “Browse”

Double click on your server name

Double click “Forward Lookup Zones”

Double click the domain of your SharePoint environment.

Select “(Same as parent folder)” and click “OK”

Click “OK”.

Now the setting of DNS is get complete. 

Four main benefits of SharePoint 2013 Apps:

1. Multiple Hosting Options: These Apps are available in Cloud App Model & provides various hosting options for your app.   

2. Use Programming Models & web development tools: SharePoint web app supports various programming models such as JavaScript, HTML, and ASP. NET etc. It also provides web development tools such as Microsoft Visual Studio 2012; through this you can build apps for SharePoint. 

3. Security via Isolation: You can use SharePoint Apps to isolate the app from the main domain. You can also protect your sensitive data from unauthorized access by using these apps.

4. SharePoint Apps Catalog: An apps catalog have bunch of apps that can be used by IT professionals as well as end users for their corporate or personal use. 

Apps are also available in new latest version of Word, Excel, Outlook, Project, and PowerPoint 2013.

Thursday, February 28, 2013

How to restore deleted site in SharePoint 2013

When we delete any file from our system, it automatically goes to recycle bin. In SharePoint 2013, same procedure applied. When we delete a site, it is not get permanently deleted, it stored in the second-stage Recycle Bin. By default, these deleted items setting is set for 30 days. After completing 30 days, deleted sites get permanently removed from the farm. We can also set this time value as needed to retain the deleted site. You can access time settings, from “Central Administration” click “Application Management” > “Manage Web Applications”, highlight the desired web application and from the Ribbon click “General Settings”. 

So you can use recycle bin to restore your deleted sites before the default time value expires. Here is the full overview of Recycle Bin:

The recycle bin divided in to 2 stages:

1st Stage Recycle Bin: 

We can access this recycle bin by following this path: 

You can also access this recycle bin by adding “/_layouts/15/Recyclebin.aspx” at the end of your sites root URL.

2nd Stage Recycle Bin: This recycle bin is available only for site collection administrators & can be access by following this path: click Site Actions, and then click Site Settings.

In Site Collection Administration section

Click Recycle Bin

If you are site collection administrators then you can use 2nd stage recycle bin to restore your deleted sites. Before using this option, you must check these points: 

  • If the site is in the Recycle Bin, at this time if you added any content types then it will not included. Therefore, field definitions might not be up-to-date. 
  • If the site is in the Recycle Bin, at this time Content deployment will not work for a deleted site. To resolve this issue, scoped deployment must be run for this site. 
  • If the site is in the Recycle Bin, at this time if you update package or install hotfix, the update package will skip the site. To resolve this issue, update the site afterward. 

Restore a deleted site from 2nd stage recycle bin: First you should verify that the account that is used to perform this procedure has the site collection administrator permission.

  • log on as site collection administrators
  • In Central Administration, click Site Actions>>Site Settings.
  • In the Site Collection Administration section, click Recycle Bin.
  • On the Recycle Bin page, select the check box for the deleted site that you want to restore.
  • Click OK.

Some Marking Points: 
  • 2nd stage Recycle Bin has a setting of site quotas for space limitations. If it reaches its quota limit, older items will be overwritten.
  • If you are not enabled site quotas then 2nd stage recycle bin will have no space limitations.
  • When a site is deleted, it directly goes to the 2nd stage recycle bin.
  • A user will only see items they have deleted in the recycle bin.
  • If you turned off the functionality of recycle bin then the items are permanently deleted and can only be restore from a backup.

Hope the article will help you understand Recycle Bin Functionality in SharePoint 2013!!