Saturday, September 30, 2006

History of SQL Server ...

I suggest all SQL developers to have a look at http://SQLKnowledge.com. The site is rich with information on SQL Server and its really informative.

I read the history of SQL Server from that site and here is the summary of it:

1. 1993 - SQL Server 4.21 for Windows NT
2. 1995 - SQL Server 6.0, codenamed SQL95
3. 1996 - SQL Server 6.5, codenamed Hydra
4. 1999 - SQL Server 7.0, codenamed Sphinx
5. 1999 - SQL Server 7.0 OLAP, codenamed Plato
6. 2000 - SQL Server 2000 32-bit, codenamed Shiloh
7. 2003 - SQL Server 2000 64-bit, codenamed Liberty
8. 2005 - SQL Server 2005, codenamed Yukon
9. Next release - codenamed Katmai (not confirmed )

Technorati tags: , , ,

Wednesday, September 27, 2006

About 'RESOURCE' Database in SQL Server 2005

1. 'Resource' Database is a new DB introduced in SQL Server 2005. Its shortly referred as 'RDB'.

2. Its an 'Hidden' and 'Read-only' DB.

3. You could find its 'mssqlsystemresource.mdf' file here -- C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data (If you have SQL Server 2005 installed in your box)

4. This is the database where all 'System objects' which belongs to 'Sys.' Schema physically reside. i.e., has definition of all System objects. These 'System objects' (like, sp_help) logically appear in every other DB in the server.

Schema -- It is similar to namespaces in .NET, it helps in logical grouping.
Sys -- Is newly created schema in SQL Server 2005. All System Objects resides here.

5. If you run this below script from any of your SQL Server 2005 database it would return 1741 rows. Those are 'definitions' of ALL the system objects which actually reside in RDB.

Select [name], object_definition(object_id) from sys.system_objects

6. This RDB makes 'Service Pack' upgades easy.

In SQL Server 2000 -- Lets assume a change happens to a system object. It would go and touch ALL database where this system object exists. Its bit tedious and risky. That was the reason, Service packs have a disclaimer urging us to backup our databases before we start the installation process :)

In SQL Server 2005 -- Since System Objects definitions is now stored only in Resource Database, Service Pack upgradation becomes quite simpler.

Technorati tags:

Tuesday, September 26, 2006

Creating our own 'Code Snippets' in Visual Studio .NET 2005

Code Snippets are useful in situations where you frequently implement the same code blocks in multiple places within your project.

One could find all existing snippets for C# in this folder:
C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#

If you want to create your own snippet which is not existing in the above path then do the following:

1. In Visual Studio.NET, Create a New Xml File.
2. Place the following XML code into that file:

The root element for an code snippet is <CodeSnippet>. This would have two child elements <Header> and <Snippet>

<?xml version= "1.0" encoding="utf-8" ?>
<CodeSnippets xmlns = "http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format ="1.0.0">


<Header >
<Title> Title of the Code Snippet would come here </Title>
<Author> Vadivel Mohanakrishnan </Author>
<Description> Describe it in detail here </Description>
<Shortcut> vel </Shortcut>
</Header>

<Snippet>
<Code Language=" CSharp">
<![CDATA[
//Your code block needs to be placed here.
]]>
</Code>
</Snippet>

</CodeSnippet>
</CodeSnippets>

3. Using "Save As" dialog box, save it as 'MySnippet.snippet' on C drive (for example). Its because, Code Snippet is nothing but a XML file.

Now within your Visual Studio.NET 2005 do the following:

1. In the tools menu, select "Code Snippet Manager". Please note that by default "Code Snippet Manager" may not be visible. So go to Tools - Options and choose it for the first time.

2. Then, click on 'Import' button and locate the new snippet on your desktop. During that process if it throws an error like "The snippet files chosen were not valid" it means there is some error in the XML file. Fix it and try again.

3. Place the snippet under "My code snippets".

4. That's it you are done. Now open any file (.cs, class module etc.,) and right click and choose "Code Snippet". You could see our newly created snippet there. On click of it would place the code whatever we have written in our XML file.

5. Other way is to just type the shortcut (in this case its just vel) and press the TAB key.

For further reading on this topic I suggest you to go through these links: http://msdn.microsoft.com/vstudio/downloads/codesnippets/ and dotnetfun.com

Technorati tags: , ,

Sunday, September 24, 2006

SQL Server Configuration Manager ...

Though there are lots of articles on "SQL Server Configuration Manager" I thought I would put down few bulleted points on this topic for easy reference :)

1. In order to access SQL Server Configuration Manager do this:

Start >> Programs >> Microsoft SQL Server 2005 >> Configuration Tools >> SQL Server Configuration Manager

2. Services pertaining to SQL Server would be available inside this tool under the heading "SQL Server 2005 Services".

This is only for easy access, as these "Services" are still available (as it was all this days!) within Control Panel >> Administrative Tools >> Services.

3. This tool has Server and Client Network configuration services.

Net libraries facilitate IPC (Interprocess Communication) exchange of information between Client and Server.

In SQL 2005 we have four ways (Protocol names) by which IPC can take place. They are "Shared Memory", TCP/IP", "Named Pipes" and "VIA". All other legacy protocols which were there till SQL Server 2000 have been removed.

Let me explain the 2 ways which are popularly in use :)

Shared Memory -- If "Client" and "Server" are on the same box then this is the preferred method way.

TCP/IP -- Faster way of communicating between the "Client" and "Server". It uses the port 1433.

Protocol priorities OR order can be specified. That is, for an example, Client can set "NamedPipes" as 1 and "TCP/IP" as 2. Meaning, first try to communicate with the server using "Named Pipes". If it is closed on the Server end then it would try "TCP/IP".

4. Irrespective of any number of SQL instances you have in a system there would be ONLY ONE Configuration Manager.

Additional Information:
  • In SQL Server 2005, SQL Server can listen to more than one "Ports" now. Till SQL Server 2000, this wasn't possible, it could listen to only one Port.
  • Now Access can be controlled on Port Level (i.e., HTTPEndPoint)

Technorati tags: , ,

System Tables of SQL Server 2005

Microsoft has released a diagram for the SQL Server 2005 System Views. It would be a very handy reference if you want to get into some of the details of SQL Server. FYI, its a PDF file of size 1.7 MB.

Technorati tags: ,

Saturday, September 23, 2006

Bill Gates tops again in Forbes 400 richest Americans ...

Forbes updated their list of the 400 richest Americans, and Bill G has maintained his TOP spot for the 13th or 14th continuous year.

Few other notables rankings are listed below for quick reference :)

#1 - Bill Gates - Microsoft - 53.0 billions
#4 - Larry Ellison - Oracle - 19.5 billions
#5 - Paul Allen - Microsoft - 16.0 billions
#7 - Michael Dell - Dell Computer - 15.5 billions
#12 - Sergey Brin - Google - 14.1 billions
#13 - Larry Page - Google - 14.0 billions
#15 - Steve Ballmer - Microsoft - 13.6 billions
#24 - Carl Icahn - Financier - 9.7 billions
#32 - Rupert Murdoch - News Corp - 7.7 billions
#32 - Pierre Omidyar - eBay - 7.7 billions
#38 - Sumner Redstone - Viacom - 7.5 billions
#45 - Eric Schmidt - Google - 5.2 billions
#49 - Steve Jobs - Apple/Pixar/Disney - 4.9 billions

Technorati tags: , ,

Thursday, September 21, 2006

Free eBook on Visual Studio .NET Tips and Tricks

If you are a .NET developer then you should have a look at this eBOOK which talks about VS.NET tips and tricks.




Visual Studio .NET Tips and Tricks explains how to use VS.NET efficiently. Organized into short and easy-to-grasp sections, and containing tips and tricks on everything from editing and compiling to debugging and navigating within the VS.NET IDE, this book is a must-read for all .NET developers, regardless of expertise and whether they program in C#, VB.NET, or any other .NET language. This book covers the Visual Studio .NET 2002, 2003, and 2005 Beta 1 releases.

I got registered myself with the site and download the PDF for free. Its really worth our time.

Technorati tags: , , ,

Suckerfish Dropdowns ...

The original Suckerfish Dropdowns are pretty popular for implementing lightweight, accessible CSS-based dropdown menus that accommodated Internet Explorer by mimicking the :hover pseudo-class.

Well now they're back and they're more accessible, even lighter in weight (just 12 lines of JavaScript), have greater compatibility (they now work in Opera and Safari without a hack in sight) and can have multiple-levels. It can be adapted to build menus dynamically.

Technorati tags: , , ,