Archive | Data Architect

Data Modeling Tools Are Living In The Past: Your Best Bet

It's been awhile since I actively used a data modeling tool as part of my development process (three years since I even had one installed). My experience had been that almost all of them could make perfectly acceptable models by reverse engineering an existing database, but none of them accelerated the development process in an agile […]

Where is vsdbcmd.exe in Visual Studio 2012!?!

Looking for your old friend vsdbcmd.exe in visual studio 2012? There's good news and bad news. The bad news is it's gone and it's not coming back. (see this MSDN thread if you don't believe me). The good news is there's a replacement: sqlpackage.exe The path for sqlpackage.exe is typically: C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin […]

SQL Query: List All Indexes And Their Columns

Looking to write a SQL query which will list out all the indexes in your database as well as the columns in the index? Well my friend you've come to the right place. The query below will give list out the following information: Schema Table Name (or view) Index Name Is Primary Key Is Unique […]

Parse and sort SET STATISTICS IO output with Excel

I wish I could say this was my idea. Somebody posted it on twitter awhile back and I did the classic "facepalm". I have no idea how many times I manually picked apart the results of SQL Server's SET STATISTICS IO ON without considering creating a formula to handle it for me. So, somebody came […]

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 […]

Computed Column With A Date: Computed column cannot be persisted because the column is non-deterministic

Here's a fast one I just stumbled across.  Since, I'm pretty sure I've made this mistake before I thought I'd write it down in an effort to prevent myself from enduring another Groundhog Day moment.  (Yes!  I just managed another pop culture reference in an otherwise dry and lifeless technical blog post!  Stay tuned till […]

SQL Server Management Studio: Recover Lost Files

Nooooooooo!  Power outage+unsaved files SQL Server Management Studio files=Panic!!!  Wait a sec.  Don't panic.  Every modern application, especially Microsoft apps, prompts you after a crash and asks you if you want to recover your lost files right?  Right!?!  Somehow, SSMS does NOT include this feature.  Why?  No idea.  Blame Management Studio's stability.  It rarely shutsdown […]