It's Friday the 13th, during the month of October. Halloween, a strange holiday associated with horrible events, and Friday the 13th, a bad luck day, are happening this month. Both are associated with horrormovies, implying that this isn't necessarily a good month for the world. It's a double dose of bad luck, which is what Equifax would have you believe. I wrote about this yesterday, where the company would have you believe a single employee makes a mistake when a scanner fails, and hackers were ready to attack.
I've, in general, had a lucky career. I've worked hard, and things have gone my way. That doesn't mean I haven't made mistakes or systems haven't gone down, but overall things have gone well. As I think about Friday the 13th of October, I'm reminded about Murphy's Law, where things that can go wrong, may just do so. I've tended to expect that some things will go wrong and prepare accordingly. In fact, in keeping with a corrollary that I've sometimes heard to Murphy's law that if one thing goes wrong, I'd expect that something else will fail.
On this double downer of a day, I'm wondering if you've experienced that. Have you had something bad happen at work, only to find that overshadowed by something worse? Hopefully you didn't make a security mistake and then get hacked, but perhaps something else has broken?
In my career, I've had this happen, though not directly to me. I consulted with a small company to make a little extra money and because I liked their business. I was rooting for them to succeed and wrote some database code to help speed up their application. One day they call me to say that a drive array failed with the database mdf on it. I wasn't worried, and while in another state, I was ready to walk them through a restore process on the new array. Unfortunately, this was a default install, and the default backup path was on the old array. I hadn't set this up, nor was I aware of their backup process.
The lead developer was proud of himself. He'd made a backup the day before, using a file share on a network drive. He had the .bak file. I thought this would be a quick and easy call until he read the error message that not all media sets were provided. That's when I realized that the developer, while making the backup in SSMS, hadn't cleared the previous backup file from the dialog. He'd inadvertently created a striped backup.
Eventually they managed to locate a backup that was many days old. I'm not sure how far back, but they angered a number of clients, who I'm sure all started looking for a new vendor. Eventually the company failed, and I moved on. There wasn't much to be done in that situation, but it was a certainly double dose of things going wrong at the same time.
I hope few of you have had double the bad luck in your career, but if you can share a story, we're happy to commiserate with you.
The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.
SQL Clone: Now supporting databases up to 64TB
Create copies of production databases and SQL backups in seconds and save up to 99% of disk space using SQL Clone. Redgate’s new tool removes much of the time and resource needed to create and manage database copies, allowing teams to work on local environments to develop, test and diagnose issues faster. Try it free
The industry standard for comparing and deploying SQL Server database schemas
Trusted by 71% of Fortune 100 companies, SQL Compare is the fastest way to compare changes, and create and deploy error-free scripts in minutes. Plus you can easily find and fix errors caused by database differences. Download your free trial
The SQL Toolbelt includes ReadyRoll, which allows you to adopt a migrations-first approach to database source control and deployment. There are a number of different ways teams can get started with ReadRoll, and customers often ask how to get up and running when there is already an existing development database. More »
Prepare for Microsoft Exam 70-761–and help demonstrate your real-world mastery of SQL Server 2016 Transact-SQL data management, queries, and database programming. Designed for experienced IT professionals ready to advance their status, Exam Ref focuses on the critical-thinking and decision-making acumen needed for success at the MCSA level. Get your copy from Amazon today.
Yesterday's Question of the Day
(by Steve Jones):
I want to convert datetime values to datetimeoffsets to ensure all my time values are consistent and comparable. I decide to use TODATETIMEOFFSET() to do this. What do I need to pass in as a parameter(s)?
Answer: The datetime value and the hours and minutes offset.
The TODATETIMEOFFSET() functiont takes a datetime value and an offset for the timezone in minutes/seconds. This can be an integer for minutes or a string for hours and minutes.
Having trouble displaying a date in a certain format...
- Select Invoice_Exceptions.Invoice_Number, Invoice_Exceptions.ItemNum, Inventory.ItemName, Invoice_Exceptions.Amount, Invoice_Exceptions.Quantity,
Invoice_Exceptions.Reason_Code, Invoice_Exceptions.LineNum, Invoice_Exceptions.EmpName, Invoice_Exceptions.DateTime AS Day_Voided, Invoice_Totals.Payment_Method
Creating Stored Procedure
- New to SQL Server. Looking for help with the following design problem:
Create a procedure named 'delete_asset_log' that takes 1 input...
Columnstore index question
- I have some large ETL tables that i've created to snapshot production OLTP data that is sourced from more than...
expecting ID or quoted_ID. Help!
- error i'm getting from the below query: Incorrect syntax near '@DatabaseName'.
DECLARE @DatabaseName as NVARCHAR(200);
DECLARE DatabaseCursor CURSOR FOR
SELECT Name FROM sys.databases
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.