Click here to monitor SSC

Author Profile

Grant Fritchey

Grant Fritchey, SQL Server MVP, works for Red Gate Software as Product Evangelist. In his time as a DBA and developer, he has worked at three failed dot–coms, a major consulting company, a global bank and an international insurance & engineering company. Grant volunteers for the Professional Association of SQL Server Users (PASS). He is the author of the books SQL Server Execution Plans (Simple-Talk) and SQL Server 2008 Query Performance Tuning Distilled (Apress). He is one of the founding officers of the Southern New England SQL Server Users Group (SNESSUG) and it’s current president. He earned the nickname “The Scary DBA.” He even has an official name plate, and displays it proudly.

The DBA Detective: Disturbing Developments

Originally one of the articles in the first DBA Team series, Grant wonders what Raymond Chandler or Dashiell Hammett would have done if asked to write technical articles for Simple-Talk. He came up with the DBA detective, hard-boiled Joe Dee Beay Read more...

SQL Server 2014 Backup Basics

There is nothing mysterious about SQL Server backups. They are essential, however you use your databases. Grant Fritchey explains the basics of database backups and restores with SQL Server 2014. Read more...

SQL Enlight for SQL Server Management Studio

The process of doing SQL code-reviews used to be tedious and error-prone. Until SQL Enlight, it was a process that was difficult to automate for release and deployment. As it is now both a Command-line utility and an SSMS add-in, the database developer can see immediately the parts of the code that would raise eyebrows with the vigilant production DBA. Read more...

Database Administration as a Service

A DBA should provide two things, a service and leadership. For Grant Fritchey, it was whilst serving a role in the Scouts of America that he had his epiphany. Creative chaos and energy, if tactfully harnessed and directed, led to effective ways to perform team-based tasks. Then he wondered why these skills couldn't be applied to the workplace. Are we DBAs doing it wrong in the way we interact with our co-workers? Read more...

The DBA Detective: The Case of the Missing Index

When problems arise in SQL Server, we're faced with a server full of suspects, including disk I/O, memory, CPU, incorrect or missing indexes, badly written T-SQL code, out of date statistics, and full disk drives. All of these have motive and opportunity to murder the performance of our databases, and it's the DBA's job to collar the culprit, quickly without relying on luck or heroics. Read more...

Custom Metrics for Monitoring Database Mirroring

SQL Monitor comes with plenty of metrics, but there are always going to be things that you want to measure that can't be done 'out of the box'. Taking database mirroring as an example, Grant shows that custom metrics can be used to monitor and alert whatever aspect of SQL Server or database that you need. Read more...

Top Six SQL Monitor Metrics for Analysis

Many SQL Server metrics tell their story best when displayed together on the same graph, so you can see how the things you're measuring vary against each other, over time, in order to gain a summary of the stresses on the server. So what six metrics should you choose? Grant comes up with his six favourite diagnostic metrics. Read more...

Azure SQL Database Maintenance

It is increasingly likely that DBAs are now given responsibility for maintaining Azure SQL databases as well as conventional SQL Server databases. What is likely to be required by way of maintenence? What are the differences? Read more...

SQL Server Statistics Questions We Were Too Shy to Ask

If you need to optimise SQL Server performance, it pays to understand SQL Server Statistics. Grant Fritchey answers some frequently-asked questions about SQL Server Statistics: the ones we somehow feel silly asking in public, and think twice about doing so. Read more...

Statistics in SQL Server

SQL Server's Query Optimiser relies on statistics for providing a decent query plan. If the statistics are wrong, outdated or missing then you have little realistic hope of having queries that perform well. It is therefore important to appreciate how SQL Server maintains distribution statistics. Read more...

SQL Server Backup Questions We Were Too Shy to Ask

During presentations about doing database backups and restores, there seem to be two types of questions that are commonly asked - those that come from the floor during the presentation, and those that are asked in private afterwards. These are sometimes more interesting, and challenging to answer well. Read more...

SQL Server Execution Plans, Second Edition, by Grant Fritchey

Every Database Administrator, developer, report writer, and anyone else who writes T-SQL to access SQL Server data, must understand how to read and interpret execution plans. My book leads you right from the basics of capturing plans, through how to interrupt them in their various forms, graphical or XML, and then how to use the information you find there to diagnose the most common causes of poor query performance, and so optimize your SQL queries, and improve your indexing strategy. Read more...

Why is that SQL Server Instance under stress?

There are several reliable indications, using SQL Queries, of the what is causing SQL Server performance problems. Some of these are fairly obvious, but others aren't. Grant shows how you can get clues from any SQL Server as to the cause of stress. Read more...

The Seven Sins against TSQL Performance

There are seven common antipatterns in TSQL coding that make code perform badly, and three good habits which will generally ensure that your code runs fast. If you learn nothing else from this list of great advice from Grant, just keep in mind that you should 'write for the optimizer'. Read more...

Backups, What Are They Good For?

Pixar recently confessed, in an engaging video, that Toy Story 2 was almost lost due to a bad backup, but sometimes there is no 'almost'. Grant Fritchey casts a sympathetic eye over some catastrophic data losses, and gives advice on how to avoid what he has termed an RGE (résumé generating event). Read more...

How to Get Information About Your Backups

When you need to restore but aren't 100% sure about the contents of your backup files, what do you do? Head to the headers. Grant Fritchey explains how to find the useful bits in these huge stores of information and make sure you restore the right files. Read more...

SQL Cop Review

Static code analysis is used a lot by application programmers, but there have been surprisingly few tools for SQL development that perform a function analogous to Resharper, dotTest, or CodeRush. Wouldn't it be great to have something that can indicate where there are code-smells, lapses from best practice and so on, in your Database code? Now there is. Read more...

Centralized management: Tips for Managing Backups on Multiple Servers

Managing backups on a handful of servers should be a relatively straightforward process, but what about DBAs that need to automate to stay on top of large numbers of servers? What options are available, and how do they compare? Grant Fritchey looks at what's out there. Read more...

Backup Verification: Tips for Database Backup Testing

A Backup system is merely part of a recovery system. If your backups can't be used to recover the database, then they're useless. Do you regularly make sure that you can restore a database from your backups? Read more...

Faster Restores: Best Practices to Increase Speed

Backups are an everyday part of DBA life, whereas restores tend to happen on call at 3 a.m. In this article, Grant Fritchey looks at what you should be doing to make your restores as quick and seamless as possible. Read more...

Grant Fritchey's SQL Server Howlers

We decided to ask various well-known SQL Server people to write about their favourite SQL Server Howlers. These are the common misunderstandings about how SQL Server works that end in tears, and plaintive forum questions. Grant Fritchey opens the series with some of his favourite howlers. Read more...

7 Preventable Backup Errors

The loss of a company's data is often enough to put the company out of business; and yet backup errors are generally avoidable with the application of common sense rather than deep technical knowledge. Grant digs into memories of his long experience of giving forum advice, to come up with the most easily preventable backup errors. Read more...

SSMS Tools Pack 2.0

If you work with SSMS, you’ll know how frustrating it can be when tasks you perform every day aren’t part of the core features. Mladen Prajdic certainly did, which is why he developed his free SSMS Tools Pack. Now on its second version, Grant Fritchey explains the functionality of this great free plugin. Read more...

Auditing DDL Changes in SQL Server databases

Even where Source Control isn't being used by developers, it is still possible to automate the process of tracking the changes being made to a database and put those into Source Control, in order to track what changed and when. You can even get an email alert when it happens. With suitable scripting, you can even do it if you don't have direct access to the live database. Grant shows how easy this is with SQL Compare. Read more...

SQL# (SQLsharp): A Review

Only the brave, and foolhardy, write production CLR routines if you can get the functionality already-written and tested. Whether you’re a DBA or developer, there are plenty of times when a CLR routine will save a lot of time, and occasionally provide new functionality. Read more...

Preventing Problems in SQL Server

It is never a good idea to let your users be the ones to tell you of database server outages. It is far better to be able to spot potential problems by being alerted for the most relevant conditions on your servers at the best threshold. This will take time and patience, but the reward will be an alerting system which allows you to deal more effectively with issues before they involve system down-time Read more...

SQL Virtual Restore and the Sandbox Development Environment

It is a problem to provide enough data for database development work, especially when it has to be managed, and has to comply with the conditions for using live data. Added to that are the constraints of disk space and the problem of providing risk-free deployment. Grant explains how three Red Gate tools and work together to provide a neat solution to providing the ideal sandbox development environment. Read more...

Object Level Recovery with SQL Virtual Restore

Just occasionally, a user's mistake can make far more demands on a DBA than just a simple point-in-time restore. When things get complicated, and you have to work in a hurry, then that's when SQL Virtual Restore and SQL Data Compare can work together to save the day. Read more...

SQL Backup Pro for the Accidental DBA

If you've suddenly found yourself responsible for maintaining and backing up your company's servers, you're an 'accidental DBA'. If you've been dropped in the deep end, let Grant Fritchey show you through the backup and restore functionality of Red Gate's SQL Backup Pro, showing you how to schedule regular backups, compress, restore and document your backups with ease. Read more...

SQL Server Backup and Restore for the Accidental DBA

Not everyone who is tasked with the job of ensuring that databases are backed up, and easily restorable, consider themselves to be database administrators. If you are one of these 'Accidental DBAs' then Grant Fritchey has some good straightforward advice for you to ensure that things go well when a database has to be restored from backups Read more...

It's 3AM and I'm on call

If you are part of a team that is required to ensure that an application stays running at all hours, then you're likely to experience that 3AM-callout feeling. Grant knows all too well what is required, and gives hard-won advice on the best way of keeping on top of the task of keeping the IT services running, no matter what time of day the problems occur. Read more...

Performing DBCC Checks Using SQL Virtual Restore

Ever restored a corrupted database from the backup, only to find that the backups are corrupted too - All the backups? Sure it can happen and it isn't nice when it does. To check that a database backup is internally consistent you have to use DBCC CheckDB. On a huge highly-loaded live system? Grant Fritchey has, as usual, a practical solution. Read more...

SQL Strategies for 'Versioned' Data

If you keep your data according to its version number, but need to work only with a particular version, what is the best SQL for the job? Which one works best? Which one do you use and when? Read more...

Supporting Large Scale Team Development

With a large-scale development of a database application, the task of supporting a large number of development and test databases, keeping them up to date with different builds can soon become ridiculously complex and costly. Grant Fritchey demonstrates a novel solution that can reduce the storage requirements enormously, and allow individual developers to work on their own version, using a full set of data. Read more...

Change Management and Source Control

So, given the many good reasons for using Version Control systems for managing the changes in database applications, how does one go about the rather different routines of team development, such as testing, continuous integration, and managing data? What are the issues you're likely to face? Read more...

Controlling Execution Plans with Hints

The Query Optimizer gets it right most of the time, but occasionally it chooses a plan that isn't the best possible. You can give the Query Optimiser a better idea by using Table, Join and Query hints. These come with a risk: Any choices you force on the Optimizer by using hints can turn out to be entirely wrong as the database changes with the addition of data over time. Grant Fritchey, in a chapter from his highly acclaimed book, explains further. Read more...

SQL Server Execution Plans - eBook Download

Why is my query running slow? Why isn't my index getting used? In order to answer these questions, you have to ask the same return question in each case: have you looked at the execution plan? Grant Fritchey provides the only dedicated and detailed guide to this essential topic. Download the eBook. Read more...

Understanding More Complex Query Plans

In order to be able to tackle performance issues in SQL Server , and write effective SQL, it is essential to gain a sound understanding of execution plans. Grant's previous article described graphical execution plans for Simple SQL queries. He now moves on to cover some of the more complicated plans that every database programmer will see. Read more...

Graphical Execution Plans for Simple SQL Queries

Learning how to read and analyze execution plans takes time and effort. But once you gain some experience, you will find them an essential skill for getting to grips with performance issues in SQL Server Queries. Grant here describes the range of execution plans for different simple SQL Queries. Read more...

SQL Server Execution Plans

Why is my query running slow? Why isn't my index getting used? In order to answer these questions, you have to ask the same return question in each case: have you looked at the execution plan? Grant Fritchey provides the only dedicated and detailed guide to this essential topic... Read more...

Execution Plan Basics

Every day, out in the various discussion boards devoted to Microsoft SQL Server, the same types of questions come up again and again: Why is this query running slow? Is my index getting used? Why isn't my index getting used? Why does this query run faster than this query?. The correct response is probably different in each case, but in order to arrive at the answer you have to ask the same return question in each case: have you looked at the execution plan? Read more...

SQL Server Performance Crib Sheet

Grant Fritchey provides an eagle-eye view of effective tools, strategies and techniques for SQL Server performance measurement, tuning and testing. Read more...

SQL Server Error Handling Workbench

Grant Fritchey steps into the workbench arena, with an example-fuelled examination of catching and gracefully handling errors in SQL 2000 and 2005, including worked examples of the new TRY..CATCH capabilities. Read more...

SQL Server 2005 Backups

If business today is data, then the entire enterprise is in the capable hands of you, the SQL Server DBA. Before you panic, check out Grant's detailed dissection of SQL 2005 backup and recovery regimes. Read more...

SQL Server Performance Testing

When faced with two viable solutions to a badly compromised database design, one using clustered indexes and the other compound primary keys, Grant Fritchey took the only sensible route: he gathered hard performance data... Read more...

Why Join

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.