Wednesday, April 3, 2013

SQL CLR Vs T-SQL - Microsoft SQL Server

In this blog post, comparing the SQL CLR and T-SQL in Microsoft SQL Server

Attribute   T-SQL SQL CLR
 Code Execution




 Interpreted Compiled
 Code Model Set-Based Procedural-Based
 Access to subset of the .NET
Framework Base Class Libraries (BCL)
 No    Yes
 SQL Server Access  Direct Access In-Process Provider
 Support Complex types No Yes
 Parameter Support Input and Output
Parameters
 Input and Output
Parameters

SharePoint - SandBox solutions Vs Farm Solutions

In this blog post, documenting the quick notes that I made during my learnings on SharePoint SandBox solutions Vs Farm Solutions.

Farm Solution
  • Farm admin needs to deploy
  • Deploy WSP
    • Add WSP to Solution Store using AddSolution
    • Deploy Solution using solution store management page in Central Admin or through Powershell

Sandbox Solution
  • Site Collection Owner can deploy
  • Runs inside a secured monitored process
  • Have Limited Resource Access
  • When deployed will not show up in
    • GAC or in FileSystem
  • Deploy Sandbox solution to Site Collection
    • Site Settings --> Galleries - Solutions --> Upload
  • 14 hive --> UserCode
    • SPUCWorkerProcess.exe is where the Sandbox solution runs not inside the W3WP.exe
    • Web.config --> Trust Level defined as wss_sandbox
  • Central Admin
    • System Settings
      • Services --> Start --> MS SharePoint Foundation Sandboxed Code service
  • Configure Quotas and Locks
    • CA --> Application Management
  • Load Balancing
    • CA --> System Settings --> Manager User Solutions
  • Not allowed (Restrictions)
    • Objects over SPSite
    • SPSecurity (No Impersonation)
    • No FileSystem access
    • WebPart Communications not allowed (As WP comm uses Reflections internally)
  • Solution Validator
    • SPSolutionValidator
      • Using Microsoft.SharePoint.Administration;
      • Using Microsoft.SharePoint.UserCode;
  • Sandbox Solutions Full Trust Proxies
    • Instead use WCF service


Debugging SharePoint Solutions


In this blog post, summarizing quick hint of attach to process and debugging sharepoint solutions

  • Farm Solutions
    • Attach to process W3WP.exe
    • Attach to process OWSTimer.exe
  • Sandbox solutions
    • Attach to process SPUCWorkerProcess.exe
  • Client Side Code
    • Silverlight or Javascript
      • Attach to particular browser process
        • iexplore.exe

Tuesday, March 26, 2013

Windows Azure HDInsight now available for public preview

When I accessed the https://www.hadooponazure.com, I saw announcement from Microsoft that HDInsight is integrated now with WindowsAzure.com and available for public preview.


Windows Azure HDInsight How to check Hadoop available components and its versions

Windows Azure HDInsight is the Hadoop distribution based on the Hortonworks Data Platform 1.1.0

One of the way to check the available components and their versions is to login to a cluster using RDP connection and go to "C:\apps\dist\" directory.


Windows Azure HDInsight provides Hadoop services through following components:

Apache Hadoop 1.0.3
Apache Hive 0.9.0
Apache Pig 0.9.3
Apache Sqoop 1.4.2
SQL Server JDBC Driver 3.0
Apache Oozie 3.2.0
Apache HCatalog 0.4.1
Apache Templeton 0.1.4

Friday, March 22, 2013

Boot from VHD - Windows Server 2012


In this blog post I will list the steps required to Boot from VHD - Windows Server 2012.

Reason for Boot from VHD, if you really want to make use of full hardware resources. No virtualization and sharing of resources, so you get better performance.

To start with, you can download the VHDs from Technet website links below

Windows 2012 - 180 days validity


Windows 8 - 90 days validity


Please follow the steps below to boot from VHD
1.     Boot into Windows 7 OS.
2.     Go to Disk Management option. 
       Right click My Computer --> Manage
       or
       Start --> Run --> DiskMgmt.msc
3.       Choose menu Action --> Attach VHD.
4.       Browse to your Windows 2012 VHD, click OK until the VHD is attached as a drive on your system.
5.       If no drive letter is assigned to the VHD, assign one manually. (Right click on the Volume and use Add/Change Drive Letters.). for example say J:
6.       Run Command Prompt as Administrator C:\Windows\System32>
7.       Run using command prompt --> C:\Windows\System32\BCDBOOT.exe  "J:\Windows" (where J:\ is the drive letter of your Windows Server 2012 VHD).

BCDBoot will copy the boot stack settings from J:\Windows (bootmgr, etc.) and install them on your system.  It will also set up a new OS Boot Loader entry for the Windows Server 2012 VHD and mark it as default boot loading option.

Note:
I  used EasyBCD from http://neosmart.net/EasyBCD/ for Boot Loader settings change, as i donot want the VHD boot loading as my primary boot load option.

Recommendations when you work on VHD based development
- Save files to main hard drive and not to the VM virtual drives so we have files safer.

Thursday, February 28, 2013

Check SharePoint Build version

In this post documenting following three ways of checking the SharePoint build version

  1. Using PowerShell script
  2. Using Central Admin
  3. Using SharePoint Admin database Versions table sql select query

1. Using PowerShell Script

Get-SPFarm | Select BuildVersion


2. Using Central Admin


a. Open Central Admin and go to Upgrade and Migration



b. Under Upgrade and Patch Management click on link "Check product and patch installation status" and now you can now view the patch status for products installed on servers in the farm.






3. Using SharePoint Admin database Versions table sql select query

Log in to SharePoint database server and select the SharePoint Admin database.

select * from Versions


Wednesday, February 27, 2013

XML Formatting using Notepad++ editor

There are occasions where i had received XML files that are not formatted. I know we can view XML files in browsers however XML data modifications and viewing/manipulating/searching XML data etc needs some effort using XML editors etc. First before XML data modifications everyone prefers the XML data is in readable and formatted with indents.

So assume XML data is not formatted like in screenshot below...



Steps below explains how to do XML Formatting using Notepad++ editor
1. Install the XML Tools plugin that comes FREE as part of NotePadd++ editor.
2. SELECT ALL TEXT (CTRL+A) the XML data that you want to format
3. Go to Menu "Plugins" --> "XML Tools" --> "Pretty print (libXML) [experimental]"



4. That's it... Now you have the XML data in formatted format.