Monday, October 26, 2009

Add-ons no MS Business Intelligence Developer should be without

The main two applications that are used for Microsoft-centric development are Business Intelligence Development Studio (BIDS) and SQL Server Management Studio (SSMS). There are a few add-on utilities that increase the power and usefulness of the out of the box applications. I find these invaluable:






  • MDXStudio - the brilliant Mosha Pasumansky's take on how MDX development should take place. Tons of functionality. Worth the download if you only use it to format your MDX (but check out the other capabilities, too):
  • BIDSHelper - An add-in for BIDS that provides great capabilities for validating dimensions, seeing which SSIS objects are affected by configurations, and much more. There are versions for both SQL 2005 and SQL 2008
  • SSMS Tools Pack - (Thanks to Steve for showing me this one) Best features I've used so far are:
    • Window Connection Coloring
    • Query Execution History and Current Window History
    • Generate Insert statements from tables

Friday, October 16, 2009

Quick SQL Server tip : Find references to table or column names

Many times I have to look within a database and find all the programmable objects that refer to a particular column or table name (any string really).

There's probably a slicker, more "politically correct" way to do this, but this is what I generally use to accomplish this:


SELECT DISTINCT 'EXEC sp_helptext [' + OBJECT_NAME(id) + ']' FROM syscomments WHERE charindex('soughtfortoken', text) > 0

I've also got the output formatted to include the call to sp_helptext so that I can just paste this into a query window to see the source code that created the object. I suppose I could enhance this so it just executes via another call to EXEC, but this seems to do the job pretty well and requires no additional setup or installation.

Technically it is bad practice to query the sys* tables. Here's the equivalent query using approved systems views:

SELECT DISTINCT 'EXEC sp_helptext [' + OBJECT_NAME(object_id) + ']' FROM sys.sql_modules WHERE charindex('soughtfortoken', definition) > 0 ORDER BY 1

Followers