When databases suddenly stop working, it can be for a number of different reasons. Human error plays a large part, of course, and the DBA needs to know what these various humans are up to. DDL triggers can help alert the DBA to unauthorized tampering with a production system, of course, but DDL triggers can't tell you everything. At some point, you will need to implement your own checks.… Read more
In this article, republished from Brad McGehee's book 'How to Become an Exceptional DBA', Brad explains why there are several advantages for DBAs in continuing to take exams throughout their careers.… Read more
Alex Kozak returns with another Date puzzle. A readers question gives Alex the inspiration to see if is possible to list unused date ranges in one Select statement. … Read more
Jason Cook shows you how you can use SQL Multi Script to install or upgrade your SQL Backup server components across the network in one go, rather than installing the components manually for each server.… Read more
This is the final part of Alex's ground-breaking series on unit-testing Transact-SQL code. Here, he shows how you can test the way that your application handles database-related errors such as constraint-violations or deadlocks. With a properly-constructed test-harness you can ensure that the end-user need never sees the apparent gobbledegook of database system error messages, and that they are properly and robustly handled by the application.… Read more
When Nigel Rivett takes us on a tour of the apparently innocuous subject of Identity Columns in TSQL, even the seasoned programmer is due for one or two surprises.… Read more
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
William Brewer takes a look at the whole topic of SQL Code layout and beautification, an important aspect to SQL programming style. He concludes that once you are tired of laying SQL out by hand, you had better choose a tool with plenty of knobs to twiddle, because nobody seems to agree on the best way of doing it… Read more
In this article, David Leibowitz describes methods for scalable SQL Server 2005 Integration Services package creation. If you're no stranger to OOP, then the methods described will fit nicely in your enterprise ETL (Extract, Transform, Load) toolkit.… Read more
In which Robyn and Phil continue with their popular series on TSQL String User-functions. In this final episode, they pull together the themes from their TSQL String Array Workbench and String User Function workbench, to provide a simple TSQL string-handling package.… Read more
Even when your code tests out perfectly in the standard test cell, you can experience errors in the real production setting where several processes are hitting the database at once, in unpredictable ways. You shouldn't, of course, let it get that far, because there are now ways of simulating concurrency during the test process.… Read more
Robyn and Phil go back to basics and hammer out some basic String-handling User Functions in TSQL, based on Python examples. Plenty of sample code, and TSQL programming tricks.… Read more
Too many authors in the field of relational theory have neglected the concept of Cardinal Reciprocity. This can cause a number of subtle problems with database design in terms of its derivability, redundancy, and consistency. . Increasingly, this little-understood aspect of relational theory, that emphasises the cardinality of the attributes of tuples in a relation and the reciprocity with isomorphic foreign key restraints, is becoming a hot forum topic.… Read more
David Connell describes how the team that developed Red-Gate's SQL Data Generator tool came to realise that database developers and DBAs already knew what they wanted for their test data. The team wanted to use the Beta version of the program to get a clear message from them. . And then came the daunting task of working out the best way of incorporating all this wisdom into the final product.… Read more
Robyn and Phil start their investigation into XHTML by showing how to use TSQL to parse it to extract data, and demonstrate how to turn an XHTML table into a SQL Server Table!… Read more
Robyn and Phil show how to use XML-based arrays to make string handling easier in SQL Server 2005/2008, and illustrate the techniques with some useful functions, one of which copies the PHP str_Replace function.… Read more
When you are trying to pin down the cause of a problem with a SQL Server, there is probably going to come a time when you need to get 'trace' information. If you've ever done that, you'll know how easy it is to get overwhelmed by the detail. Here, Shawn McGehee shows how to get round the problem by capturing trace information on a schedule, filtering the captured information, and monitoring it from a central location.
… Read more
In which Robyn Page and Phil Factor try to get to grips with the difficult subject of SQL Server Alerting, and give you enough detail to put effective alerting systems into your database. … Read more
In which Arthur Fuller comes to the aid of a friend who is doing his best to administer The Database From Hell, and manages to set up a reasonable test database with which to solve some of the headaches that only a 65 million row, 600 column, table can cause.… Read more