Wednesday, October 21, 2009

Track the DB Growth

Easy way to track the Db Growth.

Many times we would like to know how much the database has grown in the past N days. Though there are many ways of tracking the dbgrowth,the easiest way would be to query the backupset table in the msdb database.

This would give the full backup sizes of the database which is infact the size of the database.


Below is the query that i would use to quickly find out the growth of the database.


select
BackupDate = convert(varchar(10),backup_start_date, 111)
,SizeInGigs=floor( backup_size/1024000000)
from msdb..backupset
where
database_name = 'databasename'
and type = 'd'
order by
backup_start_date desc


I have picked this query from some other blog and now cannot retrace it back to find the name of the author. All the credit goes to the author.

Friday, October 2, 2009

cluster.log on windows 2008 ,where is it?

Today,a friend of mine asked me ,where to find the cluster.log in Windows Server 2008. I casually replied to him you can find it in
%systemroot%\Cluster\cluster.log.

But he couldn't find it there. So i did a bit of googling and found that you have to Open a Command Prompt (cmd.exe) and type the following command:

Cluster /Cluster:yourclustername log /gen /copy “C:\tmp”


The log file will be created in the specified location and you can view the contents by opening it in notepad.