Tag: best practice

  • Preventing Failed SSRS Subscriptions: Which user created your subscriptions?

    Check it out my friends. You need to keep an eye on which accounts are creating your SSRS subscriptions. Why? Because buried inside the ReportServer database (with no way to change it from the front end) SQL Server Reporting Services  is keeping track of this information. And when one of those user’s account is disabled strange…

  • SSRS: A Hidden Tablix That Won’t Hide And Wham!

    Here’s a real quick tip after banging my head against the desk for awhile. I had a tablix in SSRS that was supposed to be hidden if there were no rows. It was working fine until, wham, it stopped working. (Oh no. I said “wham”. That obviously leads me to “Wham!”. I had my mom…

  • Formatting MDX and DAX: Free Online Tool From Microsoft

    Ever cut and paste a mess of generated MDX from Excel? How about a coworker who doesn’t know how to use the “tab” key when working in SQL Server Management Studio? I came across this no frills online MDX formatter from “Microsoft Labs” and have been using it for the last few days to clean…

  • Alter Table: Add Not Null Column – SQL Server

    Listen up my people.  NOT NULL columns are your friend.  It may take a few extra brain cells to populate it initially but the long term rewards in data quality are well worth it. (You’ll also force all your software developer cohorts to think specifically about the values they’ll be inserting into a column which…

  • SQL Script: Distinct Column Values Across All Tables

    Sometimes I wonder if some of the more random scripts I post are useful to anyone but me so if this one is useful to you definitely drop a comment below! Check it out:  Our team was trying to confirm what our best practice was when creating flag columns in the data warehouse.  As usual…

  • Version Control For Database Objects: Why Visual Studio and TFS are a killer combo

    Awhile, back I answered a LinkedIn question on version control for database objects.  After continuing to use Visual Studio for Database projects for an additional four years since the original question was asked, my answer remains the same.

  • SQL: Create Schema If Not Exists

    When deploying code I try to create my scripts so they can be rerun without an error being thrown (e.g. “object already exists”).  There’s some fancy word for this that I used to try and use so as to appear ostentatious but it turns out people found me ostentatious even when I didn’t use the…

  • Clearing the SQL Server Analysis Services Cache

    Preparing to do some MDX performance testing?  Step one for each and every test should be to clear the cache.  This will ensure you are seeing the performance results without the benefit of having data already loaded up in memory.  How do you empty the MS SQL Analysis Services cache prior to running your query?

  • The Four Database Design Principles You Should Be Using

    The Four Database Design Principles You Should Be Using

    “Obey the principles without being bound by them.” -Bruce Lee   Do you have some guiding principles you use when designing a new feature or when implementing a new requirement?  I do.  And you should too.  I put them to paper a few years ago while we were undergoing a hiring binge and I wanted…

  • The Three Best Tips For Effective Code Reviews And Preventing Knife Fights!

    Bring a group of senior business intelligence professionals or SQL Server pros together to review each others code and you have all the potential for a good knife fight.  As our team is getting ready to make design/code reviews a regular part of our development process we’re looking to make sure we get off on…