Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is your biggest SQL Server mistake or embarrassing incident?

You know the one I am talking about.

We have all been there at some point. You get that awful feeling of dread and the realisation of oh my god did that actually just happen.

Sure you can laugh about it now though, right, so go on and share your SQL Server mishaps with us.

Even better if you can detail how you resolved your issue so that we can learn from our mistakes together.

So in order to get the ball rolling, I will go first……..

It was back in my early years as a junior SQL Server Guru. I was racing around Enterprise Manager, performing a few admin duties. You know how it is, checking a few logs, ensuring the backups ran ok, a little database housekeeping, pretty much going about business on autopilot and hitting the enter key on the usual prompts that pop up.

Oh wait, was that a “Are you sure you wish to delete this table” prompt. Too late!

Just to confirm for any aspiring DBA’s out there, deleting a production table is a very very bad thing!

Needless to say a world record was promptly set for the fastest database restore to a new database, swiftly followed by a table migration, oh yeah. Everyone else was none the wiser of course but still a valuable lesson learnt. Concentrate!

like image 645
John Sansom Avatar asked Feb 09 '09 14:02

John Sansom


People also ask

What are the challenges faced in SQL Developer?

Ensure that all database resources are accessed in the same order every time. Make updates to SQL before beginning a task or transaction. Don't allow the data to be used during tasks and transactions. Limit or avoid the use of cursors when coding.

What is error severity in SQL Server?

When called in a CATCH block where an error occurs, ERROR_SEVERITY returns the severity value of the error that caused the CATCH block to run. ERROR_SEVERITY returns NULL if called outside the scope of a CATCH block.


1 Answers

I've seen plenty other people miss a WHERE clause.

Myself, I always type the WHERE clause first, and then go back to the start of the line and type in the rest of the query :)

like image 107
Alnitak Avatar answered Sep 17 '22 00:09

Alnitak