Browsing Archive: October, 2012

Constraints, Columns, and Tables oh My...

Posted by John Trumbul on Wednesday, October 10, 2012, In : SQL Scripts 
Over the years I have been guilty so many times of writing a rollback script that rolls column additions to a table. Which is essentially a script that will drop the added columns. When i create a new column with a default value i ALWAYS use a constraint name which i created. In the event you inherit someone else database who does not (not mine of course) :) forgetting to drop the default value constraint (which is something only an inexperienced DBA would do NOT ME of course) :)

As luck woul...
Continue reading ...

Dumping IO Stats to powershell, and WTF did he just say.

Posted by John Trumbul on Sunday, October 7, 2012,
Hello All,

A 2 part post this month, i guess i finally removed head from arse and got around to posting updates. First a super useful query for IO stats of log and data files. Please note these are at file level. This may exist already and im sure there are better ways to do this, but since i have been going through a ton of logs and data files at work recently, i figured it was worth a post.

DB_NAME(tblFileStat.database_id) AS databaseName ,
tblFileStat.file_id ,tblMasterFile.phy...
Continue reading ...

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to and sign up today!

Make a free website with Yola