DBADiagnostics – My DBA Database

A couple years ago I started consolidating all of my DBA scripts into a portable DBA database that I could use for diagnostics (hence the silly name) and for maintenance scripts. To help me to continue to be inspired to update the database and to get some feedback, I plan to post a number of the tables, procedures, and other database components over the next few weeks.

Hopefully others will get as much use out of these as I have. To make it easier to find these posts, you can search my blog for the tag DBADiagnostics and all of those future posts should pop right up.

For convenience sake, here’s is the script that I used to create the DBADiagnostics database:

USE [master]
GO

IF EXISTS(SELECT * FROM sys.databases WHERE name = 'DBADiagnostics')
    DROP DATABASE [DBADiagnostics]
GO

CREATE DATABASE [DBADiagnostics] ON PRIMARY (
    NAME = N'DBADiagnostics'
    ,FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\DBADiagnostics.mdf' 
    ,SIZE = 10240KB 
    ,MAXSIZE = UNLIMITED
    ,FILEGROWTH = 10240KB 
)
,FILEGROUP [Data] DEFAULT (
    NAME = N'DBADiagnostics_data'
    ,FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\DBADiagnostics_data.ndf' 
    ,SIZE = 10240KB 
    ,MAXSIZE = UNLIMITED
    ,FILEGROWTH = 10240KB 
)
LOG ON (
    NAME = N'DBADiagnostics_log'
    ,FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\DBADiagnostics_log.ldf' 
    ,SIZE = 10240KB 
    ,MAXSIZE = 2048GB 
    ,FILEGROWTH = 10240KB 
)
GO
Of course, depending on your directory structure above you may need to change those values.

 del.icio.us  Stumbleupon  Technorati  Digg 

 

What did you think of this article?




Trackbacks
  • 6/30/2009 4:37 PM Strate SQL wrote:
    I haven’t blogged much since getting back from vacation.  It seems like a good restart after the
Comments

Leave a comment

Submitted comments will be subject to moderation before being displayed.

 Enter the above security code (required)

 Name (required)

 Email (will not be published) (required)

 Website

Your comment is 0 characters limited to 3000 characters.