Wednesday, June 02, 2010

Microsoft Fixing a Bug I Reported

In February of 2009, I reported a bug in SQL Server Management Studio: SSMS 2008 Uncomment Bug using connect.microsoft.com.

This week, I received an e-mail stating "I am happy to say that this issue has been fixed and it will be part of a future release of Sql Server."

It's nice to know that they actually fix things that are reported this way.

Friday, January 29, 2010

Index Columns

I seem to always have to rediscover how this works, so I'm going to record it.

This is how to join sys.indexes, sys.index_columns, and sys.columns.

SELECT ...
FROM sys.indexes        AS i
JOIN sys.index_columns  AS ic
  
ON   i.[object_id] ic.[object_id]
   
AND i.index_id    ic.index_id
JOIN sys.columns        AS c
  
ON   ic.[object_id] c.[object_id]
   
AND ic.column_id   c.column_id

Monday, November 16, 2009

Find All Functions and Procedures That Have No Parameters

To find all functions that have no parameters, use this code:
SELECT o.name AS FunctionName
FROM sys.objects                    AS o
LEFT OUTER JOIN sys.all_parameters  AS p
ON o.[object_id] p.[object_id]
WHERE o.type IN ('AF''FN''IF''TF')
  AND 
p.parameter_id IS NULL
ORDER BY o.name

To find all stored procedures that have no parameters, use this code:
SELECT o.name AS ProcedureName
FROM sys.procedures                 AS o
LEFT OUTER JOIN sys.all_parameters  AS p
ON o.[object_id] p.[object_id]
WHERE 1
  
AND p.parameter_id IS NULL
ORDER BY o.name

Friday, November 13, 2009

Download PASS Summit Session Presentations

I couldn't figure out how to get access to the PASS Summit session presentations. Here's the scoop. Thanks to Elena Sebastiano at PASS for the instructions.

To download session presentations:
  1. Log onto the PASS Summit Itinerary Planner using the email address you used when registering for the conference
  2. Click on Presentation Decks from the top menu
  3. From there you can search by track, session code or speaker to choose a session
  4. Once you have located your session(s) of interest, click on the session title
  5. From the session info page scroll to the bottom and click on the View button
  6. Then click on the link provided to gain access to the handout(s)