SQL Server Expert Blogs
It is ironic that one of the most essential of statistical aggregations, the median, has been so difficult in the past to calculate efficiently in SQL. Although the recent window functions provide the solution, there isn't an obviously superior algorithm performance-wise, particularly when working across partitioned sets. Dwain Camps sets the candidates to work and identifies the winners and losers.
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.
Every DBA needs to know about SQLPSX, the PowerShell module library that is built by DBAs for DBAs, and designed to provide intuitive functions around the SMO objects. It makes the automation of database administration easier across all versions of SQL Server since SQL Server 2000. Laerte Junior, who is one of the developers on the open-source project, describes how to use it.
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.
Rob Sheldon continues on his quest to explain all those command-line tools such as SQLCMD, Logparser, SQLIO and tablediff that are part of SQL Server. TableDiff can be used for comparing tables, as when you run automated tests that check a result against a table of expected values. The best way to learn TableDiff is to see it in action and Rob talks you through several examples.
Alex Kuznetsov describes the agile principles, techniques and tools that allowed his development team to make frequent database refactoring a reality, without disrupting users. He explains how this allowed his team to apply an iterative, evolutionary approach to the design and development of their databases, as well as applications.
For loading text, CSV or XML files into SQL Server, the Log Parser utility, with its amazing SQL engine, is likely to be the obvious choice. Although initially developed purely for converting IIS logs, the Log Parser can turn its hand to a range of formats including even event logs or the Windows registry.
Maybe the best way of helping the busy database professional to get started with practical PowerShell-based administration is to pull together all the essential community cmdlets into a toolkit for the POSH DBA, and explain how and why you'd use them.
SQL's windowing functions are surprisingly versatile, and allow us to cut out all those self-joins and explicit cursors. Joe Celko explains how they are used, and shows a few tricks such as calculating deltas in a time series, and filling in gaps.
Before the SQL Window functions were implemented, it was tricky to calculate rolling totals or moving averages efficiently in SQL Server. There are now a number of techniques, but which has the best performance? Dwain Camps gets out the metaphorical stopwatch.
SSIS is able to take sorted data from more than one OLE DB data source and merge them into one table which can then be sent to an OLE DB destination. This 'Merge Join' transformation works in a similar way to a SQL join by specifying a 'join key' relationship. This transformation can save a great deal of processing on the destination. Annette Allen, as usual, gives clear guidance on how to do it.
Sqlcmd makes many SQL Server tasks, such as automating test runs and maintenance tasks, easier and quicker. The sqlcmd command-line utility is valuable to any database developer or DBA as the prime means of executing batches of SQL Statements to SQL servers, and saving results to file. Rob Sheldon gives you the basic facts about this great utility
Too often, the batch systems that underlie a lot of database processing just grow without conscious design. When runs start to extend beyond their allotted time, and tuning no longer solves the problem, it is often discovered that batches are run in series, with draconian error handling. It is time to impose some rational design, and Nigel is a seasoned healer of batch processes.
This article is an extract from the book Tribal SQL. In this article, Mark S. Rasmussen offers a concise introduction to the physical storage internals behind SQL Server databases. He doesn't dive into every detail, but provides a simple, clear picture of how SQL Server stores data.
SQL Server Reporting Services (SSRS) has evolved over the years to incorporate many new data visualization capabilities. In this article, Scott Murray illustrates how DBAs can use these tools to produce reports that include Indicators, Embedded Charts, Sparklins, and Chart overlays.
DBAs are expected to know how to administer the technologies that are available with and peripheral to SQL Server. To properly administer them, it certainly helps to understand the technology from the point of view of the user. By using an existing SSRS report as a data feed for Excel, Rodney Landrum explains how these users can now take advantage of development efforts in new ways.
There are a large number of articles on Simple-Talk that tackle the subject of Source Control, and the extension of source control into the practicalities of build and the deployment of application code and database together. Together, they cover a wide range of topics and contain a great deal of information and experience.
Following on from his first four articles on using Data Analysis Expressions (DAX) with tabular databases, Robert Sheldon dives into some of the DAX statistical functions available, demonstrating which are the most useful and examples of how they work.