Skip to main content

Posts

Showing posts from October, 2015

Exploring Your SQL Server Databases with T-SQL

  a DBA and performance tuning consultant, for Ambient Consulting in Minneapolis , I'm often asked to analyze performance issues on a SQL Server instance with which I'm unfamiliar. It can be a daunting task. Let's face it, most of the time companies do not have good documentation about their databases. Or if they do, it is outdated, or it takes a few days to locate and retrieve it. In this article, I share a set of basic scripts that I've developed, over the years, which mine the metadata in the various system functions, stored procedures, tables, catalog views, and dynamic management views, Together, they reveal all the secrets of the databases on the instance, their size, file locations, and their design, including columns, data types, defaults, keys and indexes. If you've been used to retrieving some of this information by clinging to the mouse with whited knuckles and stabbing at the screen, then I hope you'll be pleasantly surprised at the wealth of i