Monday, December 31, 2007

Bye Bye 2007

2007 was really a vibrant year for me. New Company, new projects, new peoples, new challenges, achievements, awards, anxiety and excitement were some few colors of 2007, but above all, becoming a father will make 2007 is the most memorable year of my life. I am very thankful to my family and friends who gave their support in every up and down phase of my life. I don't believe in resolutions but keeping the tradition, I want to make this resolution and I will my try my best to follow this resolution throughout the year – I will start my sketching again. I am an artist by instinct. I left sketching few years back when I went college for engineering. I know this can't be excuse but really that time I just wanted to concentrate on my career. This unusual blog post is note to me and it will keep reminding me of my New Year resolution.

Sunday, December 30, 2007

RedGate SQL Data Generator

RedGate launched a new tool for generating SQL server for dummy/test data.

Features:
- Full SQL Server 2000 and 2005 support
- All data types supported except CLR types
- Pre & Post Scripts execution
- Command-line access version
- Import data from CSV or SQL tables
- Customizable generator settings that allow configuring the amount of nulls, unique values, minimum and maximum values, etc..
- Diverse range of inbuilt generators

Please visit here for more detail.

By the way, I have already created few PERL scripts to achieve same type functionality to some extent.

Thursday, December 20, 2007

Yet another good article on Cluster and Non cluster index

Take the example of a phone book. The actual data - that is, the name, address and phone number records - is ordered by the name. If you want to look up Joe Bloggs's phone number, you open the book somewhere near the middle, maybe see the names there start with "M", but "Bloggs" is before "M", so you go a bit earlier in the book. You keep narrowing it down until you find the entry labelled Bloggs, and that's it - all the data for that record is right there. That's a bit like a clustered index.

On the other hand, a book might have a table of contents, sorted alphabetically. If you want to find out about llamas, you search the contents for llamas, which probably then gives you a page number, at which point you go to the page, and there's the data about llamas. The difference here is that you've had to do an extra bit of indirection - following the page number pointer - in order to get to the data. You can probably now see that while you can have as many tables of contents, ordered in any way you like, one set of data can only be physically arranged in one way. This means you can have many non-clustered indexes, but only one clustered index on a table.

Full Article

Wednesday, December 19, 2007

Perl 5.10 is out

Perl is no longer teenager. Its Perl's 20th Bithday and its coming in its brand new suite.
Checkout new features of 5.10 in this document.

Of course you have to wait for 5.10 and chances are you never get it but till then Perl 5 is rocking.

Tuesday, December 18, 2007

String - Reference or Value Type

In my interviews, I observed that 90% candidates don't have clear understanding of Reference or Value Types in .NET. I am not going to explain these two things here but want to clear one interesting point here.

Though String in .NET is Reference type object but it works as Value type.
Following code snippet will print "test"

static void Main(string[] args)

{

string str = "test";

ChangeString(str);

Console.WriteLine(str);

Console.ReadLine();

}

static void ChangeString(string str)

{

str += " Changed";

}





Following some line will better explain the things:
although strings are reference types, they work rather more like value types. When one string is set to the value of another, eg
string s1 = "hello";
string s2 = s1;

Then s2 does at this point reference the same string object as s1. However, when the value of s1 is changed, for instance with

s1 = "goodbye";

what happens is that a new string object is created for s1 to point to. Hence, following this piece of code, s1 equals "goodbye", whereas s2 still equals "hello".

The reason for this behaviour is that string objects are 'immutable'. That is, the properties of these objects can't themselves change. So in order to change what a string variable references, a new string object must be created.


Restrictions on TempDB

I found it on internet. Thought you guys like to know:

  • Adding filegroups.
  • Backing up or restoring the database.
  • Changing collation. The default collation is the server collation.
  • Changing the database owner. tempdb is owned by dbo.
  • Creating a database snapshot.
  • Dropping the database.
  • Dropping the guest user from the database.
  • Participating in database mirroring.
  • Removing the primary filegroup, primary data file, or log file.
  • Renaming the database or primary filegroup.
  • Running DBCC CHECKALLOC.
  • Running DBCC CHECKCATALOG.
  • Setting the database to OFFLINE.
  • Setting the database or primary filegroup to READ_ONLY.

Monday, December 17, 2007

SQL Helper - New functionalities (2)

In my last posts, I talked about SQL helper developed by me. Following are two new functionalities added recently to application:

  1. Create database documentation in word or html format
  2. Do Uppercase SQL keywords option in Stored procedures and functions.