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.
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.So... we now have a new log with a size of 504KB...
Enjoy!