Tuesday, August 19, 2008

Visual Studio 2008 Unit test GUI


Hi there...

Fot thouse who are using unit tests build with Visual Studio 2008, I've created a Windows Forms application for running unit tests inside multiple .NET assemblys.

The project is on Codeplex.

Tuesday, August 12, 2008

Alternate log shrink in MS SQL 2005 - empty the database log

Hello...
Today I wanted to install VSTS 2008 and the installer "told" that I have no space on my HDD. After a quick look inside ProgramFiles folder, I saw that the SQL Databases have very large log files... So I've decided to empty them... After some Google solutions - without any succes - I've combined to results from thouse search results...
  1. detach a database
  2. attach a data base without the log file...

The first one is simple... Right click on the DB and choos Detach...

The second one is more tricky... You'll have to use the SP:

sp_attach_single_file_db @dbname= 'databasename', @physname= 'C:\Databases\databasefile.mdf'

The results of this SP is the following...

File activation failure. The physical file name "C:\Databases\databasefile_log.ldf" may be incorrect.
New log file 'C:\Databases\databasefile_log.LDF' was created.

So... we now have a new log with a size of 504KB...

Enjoy!