My summary of TechEd India 2009: Steve Ballmer’s keynote, a talk by the Oscar winning sound designer of Slumdog Millionaire, tech sessions and great community spirit.
SQL SERVER – List All Objects Created on All Filegroups in Database
A reader asked which object belongs to which filegroup. Here is how to list all objects created on all filegroups in a database, with a sample database.
SQL SERVER – Create Multiple Filegroup For Single Database
How to create multiple filegroup for a single database, both for a new database and an existing one, using T-SQL as well as SSMS.
SQL SERVER – Difference Between Candidate Keys and Primary Key
What is the difference between a candidate key and a primary key? A table can have many candidate keys, but only one of them becomes the primary key.
APPROX_COUNT_DISTINCT in SQL Server: Saves Memory, Not Time
APPROX_COUNT_DISTINCT counts distinct values with almost no memory. Tested on 5 million rows, it was within 2.2 percent of the exact count and needed no memory grant, while COUNT(DISTINCT) asked for 436 MB. It was not faster.
SQL SERVER – Interesting Observation of Logon Trigger On All Servers
I created a Logon Trigger to audit every successful login for a client, and one login was recorded several times on different threads. The script and what I saw.







