« May 2005 | Main | July 2005 »
How to use Nulls..
Came upon this interesting article called the Four rules for Nulls. Some of the places where the books online is not exactly correct is pointed out in this article. The most helpful aspect of this article is that it puts together in a single place the best practices to be used in working with NULLs.
Rule #1: Use NULLs to indicate unknown/missing information only. Do not use NULLs in place of zeroes, zero-length strings or other "known" blank values. Update your NULLs with proper information as soon as possible. Rule #2: In ANSI SQL, NULL is not equal to anything, even other NULLs! Comparisons with NULL always result in UNKNOWN.
Rule #3: Use SET ANSI_NULLS ON, and always use ANSI Standard SQL Syntax for NULLs. Straying from the standard can cause problems including portability issues, incompatibility with existing code and databases and returning incorrect results.
Rule #4: The ANSI Standard COALESCE() and CASE syntaxes are preferred over ISNULL() or other proprietary syntax.
June 30, 2005 in SQL Server | Permalink | Comments (0) | TrackBack
TechEd 2005, Chennai
Another edition of TechEd comes to an end. This TechEd had an separate Architecture track, which makes a reappearance after a year or two.
I attended a few Architecture sessions and then spent quite a bit of time in the community stalls. We gave out some cool car stickers about Microsoft Communities..:-)
MS India is running a contest, where the best blogs on TechEd India can win some cool gifts. You write one or more posts on the TechEd experience and then send a mail to commind@microsoft.com with links to the posts.
June 22, 2005 in TechEd India | Permalink | Comments (0) | TrackBack
TechEd 2005
It is TechEd time again. The Chennai Edition of TechEd 2005 is going to take place from tommorrow.
This year, I am going to spend time proctoring in the Hands on lab and of course, I will also be spending time at the CNUG/Community/MVP booth.
If you are coming to TechEd do drop in to the community booth.
June 19, 2005 in TechEd India | Permalink | Comments (0) | TrackBack
TSQL Cursors and CLR Stored Proc
I remember reading an article on how CLR Stored Procedures are faster than TSQL server side cursors to loop thru records in the server (I seem to have lost the link to that article).
I was working on some performance tuning on some stored proc which used server side cursors. So I thought maybe moving them to CLR proc may improve performance. So I did a small test with a dummy cursor, incrementing a counter inside the loop. For a table with 50K records, the TSQL proc took around 3 secs, while the CLR proc took <1 sec.
The procedure I was tuning, really loops thru the table takes certain columns, does some computations and checking (some complex logic here, which is why I had to use cursors in the first place) and then updates another table with the final value. So I converted the TSQL proc to a CLR stored proc and checked the performance. The CLR proc was taking longer than the TSQL proc. My guess is that the TSQL proc, though it has a slower cursor, seems to have faster execution of the Update statements. Since there were 50K updates to be done, I guess the performance gains due to the faster cursor was overshadowed by the slower updates taking place.
So, there is no easy rule on performance when comparing TSQL and CLR procs. Do a performance test before you choose which to use.
June 19, 2005 in Whidbey | Permalink | Comments (1) | TrackBack
Internet Attack Trends for 2005
Bruce Schneier has published an article in ACM's Queue magazine of Internet Attack Trends for the year 2005. You can access this article from his site pdf or html.
We expect to see more blended threats: exploit code that combines malicious code with vulnerabilities in order to launch an attack. We expect Microsoft's IIS (Internet Information Services) Web server to continue to be an attractive target. As more and more companies migrate to Windows 2003 and IIS 6, however, we expect attacks against IIS to decrease.We also expect to see peer-to-peer networking as a vector to launch viruses.
June 15, 2005 in Web/Tech | Permalink | Comments (0) | TrackBack
Autoconfig in Processmodel
Was just playing around in VS 2005 Beta 2. In the machine.config, the processModel section has an attribute autoConfig="true". But I am unable to find any documentation for this particular attribute. A google search resulted in a link to a winfx help page, which seems to have been modified and currently contains no reference to auto config.
So does this mean, this was a new feature that has been removed or is it a new attribute that has not yet been documented?
June 14, 2005 in Whidbey | Permalink | Comments (0) | TrackBack
Indian Stock Quotes
I am thinking of writing a personal portfolio manager application and so started searching for some kind of a stock quote service. I am unable to find any free web service or programmer friendly stock quote service for the indian stock market. Anyone have come across a decent one? I am ok with a delayed quote.
Or do I have to resort to screen scraping?? :-(
June 13, 2005 in Misc/Interesting | Permalink | Comments (22) | TrackBack
GMail in 1995??
I was just researching some domain names, checking whois records. An very interesting thing that I found out was that, the domain gmail.com was created on 13-aug-1995 while the domain google.com seems to have been created only on 15-Sep-1997!!!
June 11, 2005 in Misc/Interesting | Permalink | Comments (3) | TrackBack
Problem with Profiler90 in SQL 2005
If you are trying to run the new Profiler that ships with SQL 2005, Feb CTP and above on Windows 2003 (Currently I am running the April CTP and the problem exists there too), you may have some problems. Usually there are no error messages, it just runs and sits in the task manager, but no UI appears. Nor does it run correctly from the command line. Nothing really happens.
The problem seems to be due to the new profiler exe being signed. The way to get it to run is to install the Windows 2003 SP1.
More information about this problem is available here.
June 9, 2005 in Whidbey | Permalink | Comments (0) | TrackBack
TestRunner in VSTS 2005 Beta 2 Installation Problem
If you are trying to create Test projects with the Visual Studion Team System 2005, and get the following error:
![]()
Then it most probably means that you have not installed the Team Foundation Client. Looks like this is a known issue with Beta 2. This may also occur if uninstallation of Beta 1 is not correct. You can try using the Beta 1 removal tool available for download at http://go.microsoft.com/fwlink/?linkid=47065.
Thanks to Hong Gao for the post that helped solve this problem.
June 1, 2005 in Whidbey | Permalink | Comments (0) | TrackBack


