How often do you check your query plans during development to see if they contain any warnings? If you're missing them, it means that you're not getting all those hints about missing indexes, join predicates or statistics. Is the query optimiser trying to tell you about implicit conversions? Dennes shows how to view the warnings in plan cache for a particular database using SQL… Read more
OLTP databases work best when data that becomes no longer current is then transferred to a separate database for analysis and reporting. There are many ways to do this, but Feodor describes a rapid technique that takes advantage of partitions to automates the rotation of the data and moving it to the analysis server.… Read more
Constructing a test environment for your databases can be a difficult task at the best of times. Once you've actually acquired the hardware needed and architected the environment, you still have to arrange and securely transport the data. And with the rising demand for fast feedback and continuously integrated processes, having all of this automated and operating at speed is a challenge all of its own.… Read more
SQL Server Data Collector, together with Management Data Warehouse, is a fine and useful component for gathering information centrally about how SQL Server instances are being used, and thereby keeping an eye out for problems. It comes into its own when you have figured out how to configure it to run on maybe hundreds of instances using Central Management Server. Dennes describes how to tame the system so that it scales.… Read more
For a number of reasons, it pays to have the up-to-date source of all the databases and servers that you're responsible for in a central archive, in version control, and this is a job that is best automated. If you enlist the help of SQL Compare Pro, you can create a Powershell-based system that can be extended to warn you of changes, roughly when they happened, with a report of exactly what changed and how.… Read more
SQL-based distributed Cloud Relational databases aren't new, but Amazon's Aurora offers an alternative to SQL Azure, and, being MySQL-compatible, provides the obvious route to the cloud for hosted LAMP web applications. Is this of interest to the rest of us? Rob Sheldon investigates.… Read more
As a coder, the more you know about the business, the better code you're going to write. The more you know about the language in which you code regularly, the better code you're going to write. Similarly, if you're tasked with writing code against a relational database engine, you're going to need to know more about that engine. If you can examine and understand execution plans, you can achieve better understanding of the database system and you will write better database code. Grant Fritchey shows you how.… Read more
When you delete a business transaction from the database, there are times when you might want to keep a record of the data for posterity. This can become somewhat complicated if the transaction you need to delete is in a table that is the parent of a deeply nested hierarchy of dependent tables based on the foreign key relationships. In this article, Dwain Camps looks at a tidy means of doing just that.… Read more
Pre-existing databases can pose some difficulties for software developers using an ORM. To demonstrate ways of circumventing them, Jon Smith builds an ASP.NET MVC application with Entity Framework (EF) to provide a user interface to Microsoft's AdventureWorks sample SQL database. He shares his design approach for displaying and updating this data with real examples from the test web application he built.… Read more
Every time you access a relational database to make a query, you have an important decision to make: What is the appropriate isolation level for your query? If you get this wrong, the consequences can be serious. Deadlocks, Dirty reads, Non-repeatable reads, or poor performance. We're in luck, because Robert Sheldon once more answers those questions that are awkward to ask in public.… Read more
Pre-existing SQL databases, particularly if complex, can often pose problems for software developers who are creating a new application. The data may be in a format that makes it hard to access or update, and may include functions and procedures. Jon Smith looks at what tools there are in Microsoft's Entity Framework's Data Access technology that can deal with these requirements.… Read more
Having described some of the most common database deployability blockers, Matthew Skelton proposes a way to enable database continuous delivery that isn't as outlandish as it first appears. What can Conways Law and Microservices tell us about the future of databases and DBAs? Matthew shows us a glimpse.… Read more
The Project Deployment Model introduced in SSIS 2012, which was explained in the first part of this series, speeds up the deployment of database projects in which there may be hundreds of SSIS packages per project. Not only that, but deployments can be configured differently for each environments such as test and staging, and there are now ways of monitoring the status and performance of packages and of versioning the SSIS Catalog.… Read more
It is not just the rapid and painless testing, deployment and update of databases that requires care in the retention and management of configuration information. Configuration information is also essential for audit, resilience, and support. The range of documentation varies widely with the database and its setting, but the underlying principles remain the same. Without appropriate configuration management, automation is likely to be futile.… Read more
It is easy to import Excel data into database tables via TSQL, using OLEDB, either by the OPENROWSET function or linking to the spreadsheet as a server. The problem is that there are certain things that aren't obvious that you need to know about, and you feel awkward about asking such simple questions. … Read more
Whereabouts in the application should the business logic of data-validation checks be made? The advantages of a layered approach to validation that includes database constraints, would seem to outweigh the disadvantages. William Sisson explains some interesting issues.… Read more
By the time you're using PowerShell to automate an increasing amount of the system administration, database maintenance, or application-lifecycle work, you'll probably need to automate the unit-testing of the PowerShell scripts themselves. Michael Sorens introduces you to Pester, the leading test framework for PowerShell, and shows how it can make it easier to produce reliable scripts… Read more
The SQL Server 2014 In-Memory OLTP engine (a.k.a. Hekaton) is a radical change for relational databases. This article, an exerpt from Kalen Delaney's book "SQL Server Internals: In-Memory OLTP", provides a brief overview of what Hekaton is and why it's important.… Read more
Most DBAs hoard their own favourite T-SQL scripts to help them with their work, often on a USB 'thumbdrive', but it is rare that one of them offers us a glimpse of the sort of scripts that they find useful. It is our good fortune that Scott Swanberg shows us those scripts he uses for discovering more about database objects.… Read more
There aren't many frameworks for writing acceptance tests for databases, including SQL Server. FitNesse is an obvious choice since it is designed with a Wiki-style interface that, once it is configured and set up correctly, makes it very easy for a non-specialist to set up individual tests. … Read more