Sunday, December 6, 2009

SQL Server - Size of Index Table for Each Index

I'm a regular reader of Pinal's SQL Authority blog. Few days back, he posted a puzzle to find index size of each index on table. I was able to solve the puzzle and my solution was one of the two solutions selected by Pinal.

Check it out from here

//Cheers!
//Currently listening to - Thirteen by Danzing

System.Transaction.IsolationLevel

A little amusing observation,
IsolationLevel enumeration defined in the System.Transactions namespace looks something like this:
public enum IsolationLevel
{
Unspecified,
ReadUncommitted,

RepeatableRead,
ReadCommitted,
Serializable,
Chaos,
Snapshot
}
By definition, chaos means -"a state of extreme confusion and disporder. " Initially I was not able to understand what is the whole purpose of having this option (that too with a funny name)
After doing some reading (on MSDN) and talking (with peer devs), this is what I understood.

Chaos Isolation Level - Behaves the same way as Read Uncommited, with additional features as stated below:

  • It permits viewing uncommitted changes by other transactions
  • It checks any other uncompleted update transactions with higher restrictive isolation levels to ensure not to raise any conflics i.e. any oending changes from more highly isolated transactions cannot be overwritten
  • Rollback is not supported in this isolation level

If you want to perform read operations over once per transaction, then go for the Chaos isolation level

Chaos isolation level is present in SSIS as well. Select the task or container on which you want to set the isolation level. Then go to the properties and set the property named IsolationLevel to Chaos.

//Cheers!
//Currently listening to: Put your hands up (Radio Edit) by Wet Fingers

Sunday, November 1, 2009

Visual Studio 2010 Beta 2

From last few weeks I'm using VS 2010 for my daily coding work. Apart from lot of feature add-ons, this time VS got a new look. Check out these captures;

  • Visual Studio 2010 Beta 2 - Splash Screen

  • New Startup Screen




VS 2010 Rocks!!!
Scott Gu is running a series on VS 2010 and .Net 4.0 new features. Do check them out at his blog
Cheers!

Wednesday, October 7, 2009

Simplest way to prevent Phishing Attack on IE 8

Phishing attacks are becoming common these days. Recently there was a massive phishing attack reported on Hotmail. There are few easy ways by which we can prevent phishing attacks.

I use IE 8 as my default browser and it provides a nice feature known as Smart Screen Filter which helps us in identifying phishing attacks. There is also a online publication provided by Microsoft that helps in identifying phishing attacks.

I follow a simple funda while browsing web sites, whenever I require entering important information like user name, password or financial information, I look at the IE 8's address bar and identify the actual domain name of the URL. IE 8 highlight the domain name by marking it black in color while rest of the url remains grey. This helps a lot. Screen shot of Windows Live login screen is shown below.

Happy Surfing!

Saturday, September 26, 2009

Library Design - Documenting Exceptions

I’m sure most of you might already know but I thought of sharing this. If we are coding for a class library then we should always try to explicitly provide exception type that our code (method) will throw. If we provide exception values in XML Comments then those exceptions will appear in intellisense while we are using that library method. This will be handy for developers using our library. I remember this is also mentioned somewhere in framework design guidelines.

  • Method definition: Explicit exception details provided

  • Method Usage: Intellisense contains list of exceptions

Cheers!
Currently Playing : PROTOTYPE