Tuesday, November 5, 2013

App Pool vs Process ID listing

Scenarios

- Every AppPool creates W3WP.EXE process however when you are debugging through visual studio with IIS server having too many websites and app pools and you are challenged to find the right W3WP.EXE process to attach so that code debugging can be done against respective apppool W3WP.EXE


In IIS 6 (Windows 2003)
%windir%\system32\

c:\Windows\System32> iisapp.vbs

In IIS 7 (Windows 2008) and IIS 7.5 (Windows 2008 R2)

c:\Windows\System32\inetsrv>appcmd list wp

- List the web sites on your IIS server
c:\Windows\System32\inetsrv>appcmd list sites 

- Application pools on your IIS server

c:\Windows\System32\inetsrv>appcmd list appPools

Thursday, August 29, 2013

MapReduce Data Processing Pattern

MapReduce is
  • Data processing approach for processing highly parallelizable datasets.
  • Implemented as a cluster, with many nodes working in parallel on different parts of the data.
Data is divided up into small chunks that are then distributed across all data nodes in cluster for parallel processing.

MapReduce requires writing two functions:
  • a mapper
  • a reducer
MapReduce functions can be impleted in JAVA, C++, C#, Python, Javascript (to script PIG), etc...

These functions accept data as input and then return transformed data as output. Functions are called repeatedly, with subsets of data, with the output of the mapper being aggregated and then sent to the reducer. JobTracker coordinates jobs across the cluster.

Limiting factor for MapReduce is the size of the cluster.

Hadoop 

Implements MapReduce as a batch-processing system.
Optimzed for flexible and efficient processing of huge amounts of data, not for response time.

Hadoop ecosystem includes higher level of abstractions beyond MapReduce.

Hive provides a SQL kind of query language. When we submit a HiveQL query, Hive generates MapReduce functions and runs behind the scenes to carryout the requested query.

Pig is another query abstraction with a data flow language known as Pig Latin. Pig also generates MpaReduce functions and runs behind the scenes to implement the higher-level operations described in Pig Latin.

Mahout is a machine learning abstraction....TB typed

Sqoop is a relational database connector.

Use Hadoop to get right data subset and shape it to the desired form, then use BI tools to finish the analytical processing.

MongoDB Install on Windows 7 64-Bit

MongoDB requires a data folder to store its files. 
The default location for the MongoDB data directory is \data\db


Note
You may specify an alternate path for \data\db with the dbpath setting for mongod.exe, as in the following example:
C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data
If your path includes spaces, enclose the entire path in double quotations, for example:

C:\mongodb\bin\mongod.exe --dbpath "d:\test\mongo db data"

mongod.exe --dbpath "C:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\data"


C:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\bin>mongod.exe --dbpath "C
:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\data"
Sat Jun 01 17:16:41.671 [initandlisten] MongoDB starting : pid=9196 port=27017 d
bpath=C:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\data 64-bit host=BHA
RATH-XPS-PC
Sat Jun 01 17:16:41.674 [initandlisten] db version v2.4.4-rc0
Sat Jun 01 17:16:41.674 [initandlisten] git version: f25c410a9c4a88de36c82797e82
e306be2274d40
Sat Jun 01 17:16:41.674 [initandlisten] build info: windows sys.getwindowsversio
n(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST
_LIB_VERSION=1_49
Sat Jun 01 17:16:41.675 [initandlisten] allocator: system
Sat Jun 01 17:16:41.676 [initandlisten] options: { dbpath: "C:\Program Files (x8
6)\mongodb-win32-x86_64-2.4.4-rc0\data" }
Sat Jun 01 17:16:41.694 [initandlisten] journal dir=C:\Program Files (x86)\mongo
db-win32-x86_64-2.4.4-rc0\data\journal
Sat Jun 01 17:16:41.696 [initandlisten] recover : no journal files present, no r
ecovery needed
Sat Jun 01 17:16:41.885 [FileAllocator] allocating new datafile C:\Program Files
 (x86)\mongodb-win32-x86_64-2.4.4-rc0\data\local.ns, filling with zeroes...
Sat Jun 01 17:16:41.887 [FileAllocator] creating directory C:\Program Files (x86
)\mongodb-win32-x86_64-2.4.4-rc0\data\_tmp
Sat Jun 01 17:16:42.101 [FileAllocator] done allocating datafile C:\Program File
s (x86)\mongodb-win32-x86_64-2.4.4-rc0\data\local.ns, size: 16MB,  took 0.2 secs

Sat Jun 01 17:16:42.103 [FileAllocator] allocating new datafile C:\Program Files
 (x86)\mongodb-win32-x86_64-2.4.4-rc0\data\local.0, filling with zeroes...
Sat Jun 01 17:16:42.705 [FileAllocator] done allocating datafile C:\Program File
s (x86)\mongodb-win32-x86_64-2.4.4-rc0\data\local.0, size: 64MB,  took 0.583 sec
s
Sat Jun 01 17:16:42.709 [initandlisten] command local.$cmd command: { create: "s
tartup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0  reslen:37
824ms
Sat Jun 01 17:16:43.057 [websvr] admin web console waiting for connections on po
rt 28017
Sat Jun 01 17:16:43.234 [initandlisten] waiting for connections on port 27017



C:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\bin>mongo.exe
MongoDB shell version: 2.4.4-rc0
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        http://docs.mongodb.org/
Questions? Try the support group
        http://groups.google.com/group/mongodb-user
>

MongoDB as a Windows Service


Set log path
echo logpath="C:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\log\mongo.log" > "C:\Program Files (x86)\mongodb-win32-x86_64-2.4.4-rc0\mongod.cfg"

Running the MongoDB server (i.e. “mongod.exe”)
  • To run the MongoDB service:

net start MongoDB
  • To stop the MongoDB service:
    net stop MongoDB
    
  • To remove the MongoDB service:
    C:\mongodb\bin\mongod.exe --remove
Installing MongoDB on Windows
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

Sample video of building a sample web application working with MongoDB
http://www.10gen.com/presentations/building-web-applications-mongodb-introduction

Fiddler Hook for Visual Studio HTTP traffic

WinInet traffic monitoring can be done by updating the Machine.config file

Configure Fiddler

Following configuration settings are required

<configuration>
  <system.net>
    <defaultProxy>
      <proxy
              usesystemdefault="False"
              bypassonlocal="True" 
              proxyaddress="http://127.0.0.1:8888"              
              />
    </defaultProxy>
  </system.net>
</configuration>

Wednesday, June 19, 2013

Keyboard Shortcuts for Windows Server 2012

Windows Key + C - Opens Charms bar
Windows Key + Ctrl + Tab - Cycles through apps
Windows Key + Shift + Tab - Cycles through apps in reverse order
Windows Key + D - Switch to desktop (from start screen)
Windows Key + E - Opens file explorer
Windows Key + F - Search (files and folders)
Windows Key + H - Share
Windows Key + I - Settings
Windows Key + K - Devices
Windows Key + M - Minimizes current windows on desktop
Windows Key + O - Sets device orientation
Windows Key + Pause - System properties
Windows Key + PgDown- Moves current app to right monitor
Windows Key + PgUp- Moves current app to left monitor
Windows Key + PrtScr - Save screenshot
Windows Key + Q - Global search
Windows Key + R - Run command
Windows Key + spacebar - Switch keyboard/input language
Windows Key + TAB - Provides list of running programs
Windows Key + U - Ease of access center
Windows Key + V - Cycles notifications
Windows Key + Shift + V - Cycles notifications in reverse order
Windows Key + Y - Shows desktop screen
Windows Key + W - System settings search
Windows Key + X - Quick access menu
Windows Key + Z - Opens app bar

Tuesday, June 4, 2013

GeoFlow for Excel 2013

GeoFlow is basically Excel charting plus Bing Maps

GeoFlow is a three dimensional (3-D) data visualization tool for Microsoft Excel 2013 that provides a powerful method for people to look at information in new ways. It enables the data discoveries that might not be seen in traditional two dimensional (2-D) tables and charts. With GeoFlow you can plot geographic and temporal data visually, analyze that data on a 3-D globe and over time, and create visual tours to share with others.

With GeoFlow you can:
1.    Map Data: plot up to a million rows of data in 3-D, visually on Bing maps.
2.    Discover Insights: gain new understandings by seeing your data in geographic space and seeing time-stamped data change over time.
3.    Share Stories: capture screenshots and build cinematic, guided video tours that can be shared broadly, engaging audiences like never before.


Refer to link below for project codename "GeoFlow" Preview for Excel

SQL Server 2014 announcements

Saturday, June 1, 2013

Architecture of your version of Windows platform. How to find ?

How to find the architecture of your version of Windows platform?

Use the following command in the Command Prompt:

C:> wmic os get osarchitecture

Output:

OSArchitecture
64-bit



Wednesday, May 29, 2013

How to disable password expiration for a local user

This blog post describes (one of the way) steps required to disable password expiration for a local user.
1.) Start an elevated command prompt 
-- Start --> Run --> C:\windows\system32\cmd.exe
-- then right click, 'run as administrator' (accept if any UAC dialog appears for permissions)
2.) Execute the following command into the command window:

wmic path Win32_UserAccount WHERE Name='testlocaluser' set PasswordExpires=false

Microsoft HDInsight Public Preview - Setting up Hadoop cluster on Windows Azure

 Windows Azure HDInsight public preview announced on https://HadoopOnAzure.com

1-Home-2013-03-25_2353

I was an existing HadoopOnAzure.com beta users so signing up with already signed up live account

2-SignIn-2013-03-25_2355

Requesting for creating new cluster

3-Create-Cluster-2013-03-25_2355

Sample request form for cluster creation on HDInsight
4-Request-CreateCluster-2013-03-25_2356

After click on "Request Cluster" button on right bottom corner of web interface

5-Creating-Cluster

Hadoop Cluster creation in progress

6-Deploying-Cluster

Hadoop cluster created and in Running status.

7-Hadoop-Cluster-Created

After clicking on "Go to Cluster" link under Cluster URL section in screenshot above.
- we see the cluster information screen as below.

8-Cluster-Look

Configure Ports (ODBC server)

9-ODBC-Ports-Configure

Configure Ports (ODBC server)

10-ODBC-Ports-Enabled

Sample HDInsight Hadoop cluster NameNode Remote Desktop RDP connection file content

11-Remote-Desktop-config

Connecting Remotely to NameNode desktop through RDP

12-MSTSC-Connecting

Sample My Computer - Explorer view of the NameNode hadoop cluster created.

13-RemoteDesktop-DataNode-View-3

Local user "bphdinsight" created with what we provided under cluster login section during requesting form submission for hadoop cluster creation.

13-RemoteDesktop-View-1

Remote Desktop view
13-Remote-Desktop-View-2

Sample preview of setup version of builds available on Hadoop Cluster 

14-Components-And-Versions

Google BigQuery Vs HDInsight - Comparison


ComparisonGoogle BigQueryWindows Azure HDInsight
Pricing

BigQuery uses a columnar data structure, which means that for a given query, you are only charged for data processed in each column, not the entire table.
Note: The first 100GB of data processed per month is at no charge.
Only 2 pricing components (query processing, storage)
Priced based on the configuration of Hadoop cluster and storage configuration.
Storage Options
Data can be loaded directly to Tables in BigQuery project.
Note: Recommendation
-to load data files first to Google Cloud Storage and then load data to BigQuery tables.
-Max 4 GB per file
-Max 100 GB per load
-Max 1000 files per load
HDInsight provides two options for storing data
•Windows Azure Blob Storage and
•Hadoop Distributed File system (HDFS)
Data Formats
BigQuery supports two schema types:
A flat schema in CSV or newline-delimited JSON format.
A nested/repeated schema in newline-delimited JSON format.
Supports unstructured data formats
Performance
Very fast in response for the query submitted
Slow in response (waited for several minutes to hours to complete to provide required output)
Best Practices
BigQuery Data Strategies and Best Practices
Big Data Solutions on Windows Azure

Wednesday, April 17, 2013

Knockout.js overview

Knockout.js javascript library helps to build dynamic, data-centric user interfaces.

Foundation for the Knockout.js library
  • MVVM --> The Model-View-ViewModel design pattern, 
  • Observables, and 
  • Bindings
Observables
- Knockout.js uses observables to expose & track a ViewModel’s properties

  • Computed Observables
    • helps to create properties that are dynamically generated.
  • Observable Arrays
    • helps native Javascript Arrays with power of Knockout.js observables

 Bindings
- Helps to connect a user interface HTMLcomponent in the view to a particular observable.

Begin learning about Knockout.js from this Step-by-Step link
http://learn.knockoutjs.com/#/?tutorial=intro
http://knockoutjs.com/

MapReduce Design Patterns


  • Summarization patterns: get a top-level view by summarizing and grouping data
  • Filtering patterns: view data subsets such as records generated from one user
  • Data organization patterns: reorganize data to work with other systems, or to make MapReduce analysis easier
  • Join patterns: analyze different datasets together to discover interesting relationships
  • Metapatterns: piece together several patterns to solve multi-stage problems, or to perform several analytics in the same job
  • Input and output patterns: customize the way you use Hadoop to load or store data 

Wednesday, April 3, 2013

Key SQL CLR Decisions - Microsoft SQL Server

Key SQL CLR Decisions
# Using SQL CLR or T-SQL
# Using SQL CLR or Extended Stored Procedures
# Using SQL CLR or OLE Automation Procedures
# Using the Data Tier or Application Tier for Business Logic

SQL CLR Barriers of Entry

# Security Considerations
# The DBA Perspective on SQL CLR
# Implementation Considerations
# Performance Considerations
# Maintenance Considerations

Required Namespaces for SQL CLR Objects
There are four namespaces required to support the creation of SQL CLR objects. The required namespaces
are:
❑ System.Data
❑ System.Data.Sql
❑ System.Data.SqlTypes
❑ Microsoft.SqlServer.Server

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.