Tuesday, January 27, 2015

SharePoint 2010 Backup

Best Practises for backup

http://blogs.technet.com/b/surama/archive/2012/05/29/sharepoint-2010-backup-and-restore-best-practices.aspx

http://sharepoint.stackexchange.com/questions/62686/do-sql-full-backups-of-content-databases-interfere-with-sharepoint-differential

https://books.google.co.uk/books?id=GaK9AAAAQBAJ&pg=PA106&lpg=PA106&dq=blob+cache+backup&source=bl&ots=iBRkuVLa0s&sig=aF9ll6H3p1wOSOC9jSEpLhnfaAM&hl=en&sa=X&ei=ZcvIVKeiK4fj7AapwoEg&ved=0CFkQ6AEwCA#v=onepage&q=blob%20cache%20backup&f=false

Powershell Script
https://spfarmbackup.codeplex.com/documentation

Update (15-June-2017): Since codeplex is now shutting down, I have added the powershell script in above article to pages in my blog. Click on the links below to see them:

farm-backupbat.bat
Farm-Backup.ps1
params.xml

The above script has many different options, however a simpler script without much overhead can be found at http://sharepointpolice.com/blog/2010/12/07/automated-powershell-script-to-backup-sharepoint-farm-or-site-collection-with-email-notification/

Copying my version of the above script here for reference:


Add-PsSnapin Microsoft.SharePoint.Powershell –ErrorAction SilentlyContinue
try
 {
  $today = (Get-Date -Format dd-MM-yyyy)
 #Location of the Backup Folder
  [IO.Directory]::CreateDirectory("E:\Backup\DailyFarmBackUp\$today")
 # This will actually initiate the SPFarm backup.
  Backup-SPFarm -Directory E:\Backup\DailyFarmBackup\$today -BackupMethod full
 }
Catch
 {
  $ErrorMessage = $_.Exception.Message
  # Configure the below parameters as per the above.
  $emailFrom = "SPADMIN@Sharepoint.com"
  $emailTo = "Admin@SharePoint.Com"
  $subject = "The SharePoint Farm Backup Job failed on "+"$today"
  $body = "The SharePoint Farm Backup Job failed on "+"$today and the reason for failure was $ErrorMessage."
  $smtpServer = "192.168.0.0"
  $smtp = new-object Net.Mail.SmtpClient($smtpServer)
  $smtp.Send($emailFrom, $emailTo, $subject, $body)
 }



Wednesday, January 21, 2015

sql check parameter for null values

Use a statement like
(isnull(@param,'') ='' or @param=param)

Query records without waiting for unlock in SQL server

SQL Table hints specify additional options for query execution.
For a normal query in SQL server the query execution is halted temporarily if a records is being committed which results in significant delay if large number of records are being updated constantly. To avoid this issue, use with (nolock) in the from statement of the query which results in slighly older dataset, but quicker execution

Also, there is a related  table hint READPAST which just ignores the records already in lock state while querying, thus improoving performance.

More information can be found at http://www.techrepublic.com/article/using-nolock-and-readpast-table-hints-in-sql-server/

Tuesday, January 20, 2015

Configure performance in SharePoint

Tips to configure performance of a SharePoint server

http://social.technet.microsoft.com/wiki/contents/articles/7926.sharepoint-2010-tips-for-dealing-with-performance-issues.aspx

http://sharepointpromag.com/sharepoint-2010/top-10-sharepoint-2010-configuration-mistakes-and-how-fix-them



Powershell scripts to configure performance

https://gallery.technet.microsoft.com/office/PowerShell-script-for-59cf3f70

Performance benchmarks
http://technet.microsoft.com/en-us/library/ff758658.aspx

Tips for sharepoint configuration
http://sharepointpromag.com/sharepoint-2010/top-10-sharepoint-2010-configuration-mistakes-and-how-fix-them


Sharepoint diagnostic studio for performance monitoring
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=20022

Configure Sharepoint diagnostic studio
https://technet.microsoft.com/en-us/library/cc508851(v=office.14).aspx

Configure Sharepoint diagnostic studio for SQL counters
http://fsabry.blogspot.co.uk/2012/02/sharepoint-diagnostic-studio-spdiag.html

Allow loopback for sites accessing own services

http://blog.blksthl.com/2013/05/07/a-quick-guide-to-configuring-the-loopback-check/

configure the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0

Add value BackConnectionHostNames and add names of all websites without http:// or https://

Secure micro services using jwt and ocelot

  Secure Microservices Using JWT With Ocelot in .NET Core (code-maze.com)