András Belokosztolszki, Red Gate developer, shows how foreign key constraints can be disabled and re-enabled in order to simplify operations such as the bulk loading of data into related tables… Read more
William Brewer argues that, although there are technologies around that will minimise downtime in most circumstances, they are only part of the solution. At the heart of every robust system, there is planning, documentation, scripting, testing and drill. … Read more
Grant Fritchey provides an eagle-eye view of effective tools, strategies and techniques for SQL Server performance measurement, tuning and testing.… Read more
András's article on Source Control shows a lot of the thinking amongst the developers at Red Gate at that time that eventually crystallized into SQL Source Control. It identified several problems that had to be overcome before the task could be done properly. Andras's suggestions for the use of SQL Compare are now built-in to SQL Source Control, but it remains a fascinating explanation of the complications along the way. … Read more
Tired of struggling through dull, monchrome SQL, C# and VB code in website blogs and forums? Then check out the all-new Simple Talk code prettifier!… Read more
SQL 2005 wait event statistics are a good step forward, but are only useful for isolated testing, and to get a global impression on how the SQL Server is spending its time. Mario Broodbakker demonstrates why it would be much better if SQL Server collected those statistics per session and per subtask.… Read more
In systems that require, for auditing purposes, advanced logging and reproducibility of reports between runs, a straightforward update, insert, or delete may be counter-productive. In such circumstances, a bitemporal model is necessary. Adam Machanic explains how it works.… Read more
If you’ve ever used SQL Server 2005 Integration Services (SSIS), you will have come across raw files. Microsoft introduced them with SSIS as a mechanism for storing data on the local file system. The design of raw files enables data to be written very quickly but, unfortunately, to achieve this performance Microsoft has used a … Read more
In this short article, Greg Larsen performance benchmarks alternative CLR-based and T-SQL stored procedure solutions for retrieving operating system file information. He also assesses other factors to be considered when choosing the correct implementation for your system, such as ease of development and maintenance.… Read more
If you work with SQL Server 2000, then you know how painful it is to triage a server that has "gone astray". Eric Brown thinks that the new Dynamic Management Views in SQL 2005 are a big step forward.… Read more
"I can't help thinking that unless you have a good DBA on a development team and use him or her as a consultant on all database matters, we're all losing out. I end up having work thrown at me that I could teach a trainee to do, which is a waste of my talents, and the development team's database skills might be 'good enough' but could be so much better." Doug Burns assesses the role of the Development DBA and its increasing importance to the success of software projects.… Read more
SQL Server provides several "standard" techniques by which to read and write to files but, just occasionally, they aren't quite up to the task at hand - especially when dealing with large strings or relatively unstructured data. Phil Factor provides some T-SQL stored procedures, based on use of the FileSystem Object (FSO), that may just get you out of a tight corner...… Read more
The most important thing you can do as a database administrator is perform regular database maintenance. This includes regular backups, database integrity checks and optimizations. In Part 1 of a three article series, Allen White shows how to automate the backup of all of your databases, using SQL Server Management Objects (SMO) and either native backup or Red Gate's SQL Backup tool.… Read more
For those times when you absolutely, positively got to perform a cross tab query in SQL, Keith Fletcher's T-SQL stored procedure will allow you to do it "on the fly". You can add it to your database and start cross tabbing immediately, without any further setup or changes to your SQL code. Check it out, and then take the cross tab challenge. If you can compile a cross tab report that displays the order value by customer, by quarter, using the stored procedure, you may win a much-coveted prize!… Read more
A process in a complex database occasionally, and apparently randomly, manages to put table locks on vital tables. Several applications are brought to a complete halt. Armed with a T-SQL stored procedure, a violin and a keen investigative spirit, Pop Rivett tracks down the rogue SPIDs that are causing all the problems...… Read more