Every database developer uses keys, but without always understanding all the ramifications. They come with few hard and fast rules, but if you get them right from the start with a database design, the whole process of database development is simpler, and the result is likely to perform better. We asked Phil for advice, little knowing that the explanation might take a while.… Read more
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
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
When SQL Server introduced Window Functions in SQL Server 2005, it was done in a rather tentative way, with only a handful of functions being introduced. This was frustrating, as they remove the last excuse for cursor-based operations by providing aggregations over a partition of the result set, and imposing an ordered sequence over a partition. Now, with SQL Server 2012, we are soon to enjoy a full range of Window Functions. They are going to make for some much simpler SQL queries.… Read more
If you suffer from runaway queries, if you have several database applications with unpredictable fluctuation in workload, or if you need to ensure that workloads get the memory or CPU they need according to certain priorities, then you need Resource Governer, and you need Roy Ernest's clear explanation of the technology.… Read more
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
When healing a sick SQL Server, you must forget the idea that there could ever be a simple correspondence between symptom and disease: The art of troubleshooting is much more the art of discovering, and assembling, the various pieces of the puzzle so that you have a complete understanding of what is going on inside of a server… Read more
SQL is a powerful tool for querying data, and for aggregating it. However, you can't easily use it to draw inferences, to make predictions, or to tease out subtle correlations. To provide ever more sophisticated inferences to businesses, the race is on to combine the power of the relational model with advanced statistical packages. Both IBM and PostGres are ready with solutions. And SQL Server? Hmm...… Read more
Within an instance of SQL Server, the database settings can have a direct effect on the database's behavior, performance and availability. Sometimes, it is difficult to tie a symptom to a cause, so it is wise to routinely check and record these settings. Before you change the current setting, it pays to understand exactly what it means and the implications of any change.… Read more
You can save a lot of time by using the SSIS Troubleshooting tools. These enable you to work with reduced data samples, monitor row counts, use data viewers, configure error-handling and monitoring package execution. Although you can develop SSIS packages without them, it is so much easier once you're familiar with these tools.… Read more
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
It comes as rather a shock to find out that one of the commonest circumstances in an OLTP database, an ascending primary key with most querying on the latest records, can throw the judgement of the Query Optimiser to the extent that perfomance nose-dives. Fabiano once again puts on snorkel and goggles to explore the murky depths of execution plans to find out why. … Read more
Package configuration files are a great way of providing the values of SSIS package properties so that packages can be used in a far more versatile way. They make the deployment of SSIS packages easier and can provide parameters that are based on the server configuration, or which change for each runtime. They're easy to understand, especially when explained by Rob Sheldon.… Read more
To understand how to write SQL code for SQL Server that performs well, it is important to appreciate how the query optimizer works. Ben Nevarez explains the essentials, in a broad sweep through a complex subject, in an article taken from his new book 'Inside the SQL Server Query Optimizer'.… Read more
With PowerShell in one hand, and WMI in the other, DBAs can do almost anything in their Window's environments, and Laerte is using his powers for good. He built a highly precise, highly configurable alerting system for his servers, and now shows us exactly how he did it.… Read more
Script tasks are a great way of extending SSIS functionality, when the buit-in functionality isn't quite Script tasks are a great way of extending SSIS functionality, when none of the buit-in components are quite right for the task you need to perform. But how to go about creating a script task? No worries, once again Robert Sheldon is on hand to provide easy instructions on how to do it.… Read more
Are Common Language Runtime routines in SQL Server faster or slower than the equivalent TSQL code? How would you go about testing the relative performance objectively? Solomon Rutzky creates a test framework to try to answer the question and comes up with some surprising results that you can check for yourselves, and offers some good advice.… Read more
The storage subsystem for a SQL Server can prove to be a bottleneck if the best choices of hardware aren't made, but there are ways to relieve the I/O bottlenecks if the causes are well understood. This requires benchmarking. Glenn Berry gives expert advice on getting to grips with the disk subsystem. … Read more