Just for kicks (and because I hadn’t prepared my intro to Indexes…), I broke The Apprentice’s database (dbname MoreCake if you are following along) when he wasn’t looking.
I had told him I was going to break something, just to watch him try to sort it out, so he knew it was coming.
Before we got started, I changed the name of the data file from MoreCake.mdf to MoreCake .mdf.
- Start SQL Services…notice it come up fine
- Notice MoreCake came up “Recovery Pending”
- Verify Restore is an option
- Take offline
- Try to bring online
- Read error message after online failure (OS error 2, file not found)
- Look in Windows Explorer, squint, remove space
- Refresh database and smirk at me.
Elapsed time from start services to smirk? 3 minutes.
Me: Jaw on ground.
If you add it all together and are generous, he has maybe 4 days of training including videos.
I know some DBAs that would never have noticed the extra space.
We went on to look at ERRORLOGs, talk about what is contained in the master database, and a little bit of creating a database with a bunch of records to start off Index training in our next session.
And then I deleted MoreCake along with all Backup and Restore history when he went to grab a soda. Still GUI, and with no backup history to populate it he figured out to go to devices and browse for the most recent .bak file.
3 minutes. Smart dude.
Leave a Reply