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.

How to restore content database using Central Admin in SharePoint 2010 ?


  1. Open Central Administration
  2. On the Home page, in the Backup and Restore > Restore from a backup.
  3. The process contains 3 steps

Step 1
Select Backup > Select the backup job that contains the content database backup > Next.
Step 2
Select Component > select the check box that is next to the content database > Next.
Step 3
Select Restore Options > under Type of Restore > click the Same configuration option. A dialog box appears that asks you to confirm the operation. Click OK > Click Start Restore

  1. You can view the general status of all recovery jobs at the top of the Backup and Restore Job Status page in the Readiness section.
  2. You can view the status for the current recovery job in the lower part of the page in the Restore section.
  3. The status page updates every 30 seconds automatically.
  4. You can manually update the status details by clicking Refresh.
  5. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the recovery to start.