RE: major blunders

From: Kellyn Pedersen <>
Date: Wed, 7 Oct 2009 09:59:33 -0700 (PDT)
Message-ID: <>

Sheesh, you just reminded me of my dumb DBA trick that actually occurred in SQL Server 9 years ago-  Someone had removed the "WHERE USERID =XXXXX " clause from a 30 line login/user cleanup script for a SQL Server system and the last statement just issued- DELETE FROM SYSUSERS

I pretty much stopped breathing as I watched the final results on the screen: 1 row deleted.

1 row deleted.

1 row deleted

1659 rows deleted.

Microsoft said, "Yeah, start restoring, we can't help you..."  36 hrs later everyone was back in and working... That script became a stored proc that very day! :)
  • On Wed, 10/7/09, Kenneth Naim <> wrote:

From: Kenneth Naim <> Subject: RE: major blunders
To:,, Date: Wednesday, October 7, 2009, 9:57 AM

When copying and pasting delete and update statements into sqlplus put them on a single line if possible to avoid the possibility of missing the where clause.

-----Original Message-----
From: [] On Behalf Of Freeman, Donald
Sent: Wednesday, October 07, 2009 11:47 AM To: ''; Subject: RE: major blunders

Well, I always use a script to place the database name into the sql prompt. Making changes on the wrong database can ruin your whole day (or life).

So you need "do's"  and "don'ts"

Donald Freeman
Database Administrator II
Commonwealth of Pennsylvania
Department of Health
Bureau of Information Technology
2150 Herr Street
Harrisburg, PA 17103

-----Original Message-----
From: [] On Behalf Of April Sims
Sent: Wednesday, October 07, 2009 11:42 AM To:
Subject: major blunders

Compiling a list of major blunders to avoid:

Don't use the number 8 for scripting or ORACLE_SID due to the wild card character * above it.
Don't use rm *.*

Anyone else have some to contribute?


April Sims
SELECT IOUG Contributing Editor
OCP 8i, 9i, 10g DBA
Southern Utah University




Received on Wed Oct 07 2009 - 11:59:33 CDT

Original text of this message