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...
- detach a database
- 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!
No comments:
Post a Comment