Monthly Archives: September 2011

Attaching the Adventure Works 2008 databases.

The other day I needed to attach the Adventure 2008 sample databases to my test server. So I downloaded the self extractor from codeplex and hit run… and got this error: So, of course I hit Google and got several … Continue reading

Posted in SQL Server | Leave a comment

Moving a mirror database’s physical files

Today a request came in from a client to move the ldf file of a mirror database to a new SAN drive on the DR server. My immediate thought was that I would have to break the mirroring solution, recover … Continue reading

Posted in SQL Server | Leave a comment

Restoring Transaction Log Backups

I had a situation at work recently where I had to restore a database. There had been a full backup at 7pm the previous night and since then a transaction log backup had been taken every 15 minutes. By the … Continue reading

Posted in Disaster Recovery, SQL Server, T-SQL | Leave a comment

Per database tasks

Often as a DBA I am required to perform a particular task on every database, or some subset of databases. If it is the same task for each database then it makes sense to automate this in some way. Two … Continue reading

Posted in Database options, SQL Server, T-SQL | Leave a comment

Database Option Queries

Here are a few queries that I use regularly to check database options on a server: Compatibility (100 = 2008, 90 = 2005, 80 = 2000): select name, compatibility_level from sys.databases where compatibility_level != 100 — or 90, or 80 … Continue reading

Posted in Database options, T-SQL | Leave a comment

Service Broker

While checking a SQL Server upgrade I came across a corrupt msdb database. Like a good DBA I had backed up all user databases along with msdb, master and model before the upgrade so I quickly restored msdb from the … Continue reading

Posted in Database options, Service Broker, SQL Server, T-SQL | Leave a comment