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!!

Wednesday, February 20, 2013

Advanced features of SharePoint 2013


Microsoft includes many new features and capabilities in new SharePoint 2013 version. SharePoint 2013 gets completed with combination of these five words: Share, Organize, Discover, Build & Manage. This version allows you to share your work with others, organize your projects and teams, and discover people and information.  

Here is the list: 


Video Support: In the previous version of SharePoint, you cannot upload videos into libraries. But in SharePoint 2013, you can easily upload a video. 

Community Sites and Portals –






Now you can also design a community site in SharePoint 2013.  If you wanted a community site for your organization, then you can use Team Site template and modify it to accomplish having a community site. These sites are registered within a Community Portal. This is one of my favorite features as now I have a central place for my organization from where people can locate communities. 

Device Channels – In the previous version of SharePoint, there was a single default view set up for mobile users. The only problem with this view is that it may or may not be user friendly to a mobile device. In SharePoint 2013, we have a feature to publish a single site in multiple ways using different designs that target different devices.

SharePoint Apps: Users can add SharePoint Apps to pages or use them from within SharePoint.




  

Cloud First: Now SharePoint 2013 supports cloud also. 


Simple project / task management: In SharePoint 2013, the new team site template used to manage tasks & projects. You can also assign deadlines and simple work breakdown structure for your project team.  

More Advance SharePoint Analytics: Now in SharePoint 2013, SharePoint analytics divided in to 2 new tools: search analytics and usage analytics.  

Hope the article will help you to learn advanced features of SharePoint 2013. 

Friday, January 25, 2013

What to do when your SharePoint Content Database shows in suspect mode?


Yesterday when I tried to access my Central Administration site, it suddenly didn’t respond & returned HTTP error: 404. I checked everything like AppPool, ISS, all are fine. In last, I checked SQL Server Management Studio and noticed that among all my databases the SharePoint_Config was marked as “Suspect”. This error occurs when SharePoint Content database get corrupt. After searching on Google, I found two solutions to resolve this issue:  

Solutions:

1. Restore a backup of the Content database.  

Caution: Below steps may cause to lose data that's why it is extremely dangerous to execute. I will recommend you to try all other better solutions including calling to Microsoft Support, third party SharePoint Recovery Software etc. 

2. To resolve the issue, use following steps in order as mentioned:

– Use the Master database

– Verify that database has issues 
EXEC sp_resetstatus ‘SharePoint_Config’

– Put the database in emergency mode
ALTER DATABASE SharePoint_Config SET EMERGENCY DBCC checkdb(‘SharePoint_Config’)

– Set the database in single user mode
ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE

–Repair the database with data loss
DBCC CheckDB (‘SharePoint_Config’, REPAIR_ALLOW_DATA_LOSS)

–Set the database in multi-user mode
ALTER DATABASE SharePoint_Config SET MULTI_USER

–Verify that database is reset
EXEC sp_resetstatus ‘SharePoint_Config’

After running the above steps on the Master database, I Fixed Suspected SharePoint_Config database & Now I am able to access the content web application.

Thursday, December 20, 2012

How to attach repaired SharePoint Content Database to SharePoint Server


If you have restored or recovered your corrupt content database from another farm and wanted to access the sites from a Web application that farm contains then in this case, you have to first attach your content database to the farm. You can do it by using Windows PowerShell, SharePoint Central Administration. If you are performing command-line administrative tasks then I will recommend you to use Windows PowerShell because sometimes Stsadm command-line tool raise error message during this process. Here are all steps: 

1. Windows PowerShell:  Before using this step, first you should check that user account should be the SQL Serverdbcreator member. After that use following steps:

Start menu>>All Programs>>Microsoft SharePoint 2010 Products>>Click SharePoint 2010 Management Shell.

At the Windows PowerShell command prompt, type following command to attach repaired content database:

Mount-SPContentDatabase "" -DatabaseServer "" -WebApplication http://SiteName

2. SharePoint Central Administration:  Before using this step, first you should check that user account should be the farm Administrators SharePoint group member. After that use following steps:


  • SharePoint Central Administration Web site>>Application Management.
  • Application Management page>>Databases section>>Manage content databases.
  • Manage Content Databases page>>Add a content database.
  • Add Content Database page> select the Web application from Web Application drop-down menu to which you want to attach a content database.
  • Specify the database server, database name & authentication method for the database.

       Note: if you are using SQL authentication then also supply an account name and password.

  • Click Ok

Final Words:  You can also de-attach your content database by using Windows PowerShell and SharePoint Central Administration. 

Thursday, November 29, 2012

How to restore SharePoint 2013 Content Database


In my previous post I have shared about SharePoint 2013 content database backup. To restore SharePoint Content Database we can select any option out of three in SharePoint 2013: SharePoint Central Administration, Windows PowerShell, SQL Server tools. Here are steps to restore SharePoint 2013 Content Database:

Windows PowerShell:

Before using Windows Powershell, ensure that you have securityadmin, db_owner, Administrators group memberships. 

1. Start the SharePoint 2013 Management Shell by using following path:

Start>>All Programs>>Microsoft SharePoint 2013 Products>> SharePoint 2013 Management Shell.

2. Type following command on Windows PowerShell command prompt:

Restore-SPFarm -Directory <BackupFolder> -RestoreMethod Overwrite -Item <ContentDatabaseName> [-BackupId <GUID>] [-Verbose]

Here <BackupFolder> is the name and path for the backup folder & <ContentDatabaseName>is the name of the content database.

SharePoint Central Administration: 

Before using this method, first make sure that the user who is performing the procedure should have member of Farm Administrators SharePoint group.

1. Start SharePoint 2013 Central Administration.

Start>>Microsoft SharePoint 2013 Products>>SharePoint 2013 Central Administration

2. In Backup and Restore section>>Restore from backup>>select backup that you want to restore (select same backup job that content database backup have)>>click 'Next'.

3. In 'Restore Option' Section>> click same configuration option.

4. Click Start Restore.

SQL Server tools: 

Before using SQL Server tools, first you should verify that the user that is going to perform the procedure should be member of sysadmin. 

1. Open SQL Server Management Studio
2. After that connect to the database server.
3. Object Explorer>>expand Databases.
4. Right-click the database that you want to restore>>Tasks>>Restore>>database.
5. Restore Database>>specify the destination>>select the backup that you want to restore.
6. Select a page pane, click Options.
7. Restore options>>Overwrite the existing database.
8. Recovery state

  •  Use RECOVER WITH RECOVERY option if you want to restore all the transaction logs.
  •  Use RECOVER WITH NORECOVERY option if you want to restore additional transaction logs.


9. Click OK to complete your recovery process. 

Hope the steps will help you to successfully restore SharePoint Content database. 

Friday, October 26, 2012

How to Backup SharePoint 2013 Content Database

Same as SharePoint Server 2007 & 2010, We can back up & restore SharePoint Content Database by using three options in SharePoint 2013:SharePoint Central Administration, Windows PowerShell, SQL Server tools. As we all know that Regularly backing up database reduce the data loss, same applicable for SharePoint content database also, You should regularly update  SharePoint content database backup. Here are steps to Backup SharePoint 2013 Content Database: 

Windows PowerShell: 

Before using SharePoint Central Administration first you should verify that you have the following memberships: securityadmin, db_owner, Administrators group. 

1.Start the SharePoint 2013 Management Shell by using following path:

Start>>All Programs>>Microsoft SharePoint 2013 Products>> SharePoint 2013 Management Shell. 

2.Type following command on Windows PowerShell command prompt: 

Backup-SPFarm -Directory   <BackupFolder>  -BackupMethod {Full | Differential} -Item <ContentDatabaseName> [-Verbose]

SharePoint Central Administration:

Before using SharePoint Central Administration, first you should verify that the user that is going to perform the procedure should have Farm Administrators SharePoint group membership. 

1.Start SharePoint 2013 Central Administration.

Start>>Microsoft SharePoint 2013 Products>>SharePoint 2013 Central Administration

2.In Backup and Restore section>>Perform a backup>>select SharePoint content database that you want to back up>>Next.

3.In 'Backup Type section'>>Select Full or Differential.

4.In 'Backup File Location, section>>type path of the backup folder>>Start Backup.

SQL Server tools: 

Before using SQL Server tools, first you should verify that the user that is going to perform the procedure should be member of Server db_backupoperator. 

1.Open SQL Server Management Studio
2.After that connect to the database server.
3.Object Explorer>>expand Databases.
4.Right-click the database that you want to back up>>Tasks>>Back Up.
5.Back Up>>Backup type. 
6.In the Backup component area, click Database
7.Give a file name to the backup set. 
8.Give a expiration date to the backup set. 
9.Destination Section: location where you want to store backup>>Click OK. 

You should choose these backup options as per your requirements like if you are performing command-line administrative tasks then you should use Windows PowerShell. 

Wednesday, September 26, 2012

How to safely Back up SharePoint 2013 farm

You can use three options to backup SharePoint 2013 farm: SharePoint Central Administration, Windows PowerShell & SQL Server tools. We also used these three options in SharePoint Server 2010 & 2007 but the procedure was little bit different. Here are all steps:

Windows PowerShell:

1.Start menu>> All Programs 
2.Click Microsoft SharePoint 2013 Products.
3.Click SharePoint 2013 Management Shell.
4.At the Windows PowerShell command prompt, type the following command:

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} [-Verbose]

SharePoint Central Administration:

1.In Central Administration>>the Backup and Restore section>>Perform a backup.
2.Perform a Backup>>Select Component to Back Up page>>select the farm from the list of components>>Next.
3.Start Backup>> Select Backup Options page, in the Backup Type section>>select either Full or Differential.
4.Back Up Only Configuration Settings section>> Back up content and configuration settings.
5. Backup File Location section>>type the UNC path of the backup folder>> Start Backup.
6.At the top of the Backup and Restore Status page, you can view the general status of all backup jobs. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

SQL Server tools:

1.Open SQL Server Management Studio and connect to the correct instance of the SQL Server Database Engine.
2.Object Explorer>>expand Databases.
3.Right-click the database that you want to back up>>point to Tasks>> Back Up.
4.Back Up Database dialog box>>Source area>>kind of backup that you want to perform from the Backup type list. 
5.Backup component area>>Database.
6.You can use the default name or specify a new name in the Name text box for the backup set 
7.After that Specify the expiration date for the backup set. 
8.Destination area>>specify where you want to store your backup.
9.Click 'OK' to back up the database.
10.Repeat steps 1-10 for each farm database.

These above are the steps through which you can easily & safely backup your full SharePoint Server farm!!