Saturday, June 16, 2012

Restore a site collection using Windows PowerShell in SharePoint 2010


1.      Open SharePoint 2010 Management Shell.
2.      At the Windows PowerShell command prompt
3.      Type the following command, and then press ENTER:
Restore-SPSite -Identity <Site collection URL> -Path <Backup file> [-DatabaseServer <Database server name>] [-DatabaseName <Content database name>] [-HostHeader <Host header>] [-Force] [-GradualDelete] [-Verbose]
4.      If you want to restore the site collection to a specific content database, use the DatabaseServer and DatabaseName parameters to specify the content database.
5.      If you do not specify a content database, the site collection will be restored to a content database chosen by Microsoft SharePoint Server 2010.
6.      If you are restoring a host-named site collection, use the Identity parameter to specify the URL and use the HostHeader parameter to specify the URL of the Web application that will hold the host-named site collection.
7.      If you want to overwrite an existing site collection, use the Force parameter.

Sunday, June 10, 2012

Restore databases instantly


When disaster strikes, it can take hours to restore a database from backup. New SQL safe withinstant restore technology makes it possible to bring a database back on-line in minutes, not hours. With SQL safe instant restore, you can:
SQL safe screenshot
Virtually eliminate costly application down-time
Avoid impacting end-user productivity
Maintain database availability while the full restore completes in the background
Plus, SQL safe delivers fast, compressed backups (up to 95% compression!) so you can save time and storage space. Learn more.
Download a free 14-day trial now

Saturday, June 9, 2012

How to configure usage reporting in SharePoint ?


Before you enable usage reporting in a SSP, you have to first enable Windows SharePoint Services usage logging for the farm hosting the Web application containing the SSP.
Use the following procedure to enable usage logging for the farm.

Enable usage logging for the farm
1.      On the Central Administration home page, click Operations.
2.      On the Operations page, in the Logging and Reporting section, click Usage analysis processing.
3.      On the Usage Analysis Processing page, in the Logging Settings section, select Enable logging.
4.      Type a log file location and number of log files to create.
5.      In the Processing Settings section, select Enable usage analysis processing, and then select a time to run usage processing.
6.      Click OK.

Enable usage reporting
1        On the SSP home page, in the Office SharePoint Usage Reportingsection, click Usage reporting.
2        On the Configure Advanced Usage Analysis Processing page, in the Processing Settings section, click Enable advanced usage analysis processing.
3        In the Search Query Loggingsection, select Enable search query logging.
4        Click OK.

Activate usage reporting
After usage reporting is enabled for the SSP, site collection administrators must activate the reporting feature. Until the reporting feature is activated on a site collection, usage reports are not available.
Use the following procedure to activate the reporting feature.

1        On the Site Actionsmenu, click Site Settings.
2        On the Site Settings page,in the Site Collection Administrationsection, click Site collection features.
3        On the Site Collection Features page, click the Activatebutton for the Reporting feature.

How to restore content database using PowerShell in SharePoint 2010 ?



  1. Open SharePoint 2010 Management Shell.
  2. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:

Restore-SPFarm -Directory <Backup folder name> -RestoreMethod Overwrite -Item <Content database name> [-BackupId <GUID>] [-Verbose]

3.      If you do not use the BackupId parameter, the most recent backup will be used. To view a list of the backups, including their Backup IDs, type the following command, and then press ENTER:

Get-SPBackupHistory -Directory <Backup folder>

How to restore content database using SQL server in SharePoint 2010 ?


  1. If the Windows SharePoint Services Timer service is running, stop the service and wait for several minutes for any currently running stored procedures to finish.
  2. Do not restart the service until after you restore the content databases.
  3. Open SQL Server Management Studio
  4. Connect to the database server.
  5. Right-click the Database that you want to restore > Tasks > Restore > Database.
  6. In the Restore Database dialog box, specify the destination and the source, and then select the backup set or sets that you want to restore.
  7. In the Select a page pane, click Options.
  8. In the Restore options section, select only Overwrite the existing database.
  9. In the Recovery state section:
    • If you have included all the transaction logs that you must restore, select RECOVER WITH RECOVERY.
    • If you must restore additional transaction logs, select RECOVER WITH NORECOVERY.
    • The third option, RECOVER WITH STANDBY is not used in this scenario.
  10. Click OK to complete the recovery operation.
  11. Repeat steps 4 through 10 for each database that you are restoring.
  12. Start the Windows SharePoint Services Timer service.