Career Limiting Moves – Dropping a Table

In this new series, I will share some things that took place early in my career that could have resulted in my looking for new work—but didn’t!

This post is also evidence that I haven’t always worked with SQL Server.

I used to work with a PeopleSoft implementation partner, sometime last century. One morning I was on site, at a large technology company in South Africa. My senior consultant was walking me through running a script using a tool called Data Mover, against the production HRMS database.

The script created a new table in a database, copied the data from the old table, fixed up all the referential integrity, and then dropped the old table.

For whatever reason, we ran the script in the Oracle SQL*Plus client, which Wikipedia generously describes as “the most basic” database client.

Cut to the part where we run the script. The DROP TABLE command was run successfully and committed, but the previous step where the data was moved had failed.

The entire table was gone.

The senior consultant who had walked me through that process realised what had happened, made a call to the database administrator, and the database was restoring in short order.

All work that had been done that morning was lost, and it took about 2.5 hours to restore the previous night’s backup.

Moral of the story: make sure you run the right script in the right tool, and make sure your backups are being tested regularly.

Author: randolph

Randolph West is a Microsoft Data Platform MVP, and has worked with SQL Server since the late 1990s. When not consulting, he can be seen acting on the stage and screen, or doing voices for independent video games. Connect with Randolph on Google+ or Twitter.