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://

Friday, November 14, 2014

sharepoint 2010 entity (external content type) cannot be found with namespace =

I was getting this error after redeploying a solution with BDC model. There are few ways described in below posts about fixing them, but in our case they did not work

http://www.sharepointing2010.com/2013/09/restore-bcs-ect-external-content-type.html

http://sharepointpromag.com/sharepoint/deploy-vs-business-data-connectivity-model-solution-sharepoint

Finally, we exported the BDC model from dev server central admin site and imported it on the live server central admin site which worked fine...

There might be a better and more ideal solution available to this problem, but for now we are relieved.

Regex Email validation in c# dot net core

 Use this regex /^_?[a-zA-Z0-9]([a-zA-Z0-9]*[._+-])*[a-zA-Z0-9_]+@(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*\.[A-...