0

SQL Server 2008 Troubleshooting Scenarios

image_pdfimage_print

In this article I cover troubleshooting scnenarios I’ve come across in my experience working with (not really managing) SQL Server 2008. ToDo: Add whatever notes yet undocumented, as well as any future scenarios

Purging a bogus database from master.sys.databases

Scneario: I created a database refresh script. On accident, I submitted a refresh job to it where the target database name was that of the .bak file! The script produced an error and quit, but not before it created a database of that name. My coworker deleted it, but the darn thing remained in master.sys.databases. A simple drop database command was all I needed to clean this (small) mess:

[code language=”sql” gutter=”false”]
select * from master.sys.databases where name like ‘%.bak%’
drop database [D:\temp\database.bak]
[/code]

Bert Tejeda

Leave a Reply

Your email address will not be published. Required fields are marked *

Protected with IP Blacklist CloudIP Blacklist Cloud