Agree with Master Gail Or if you do not need the Logs Just drop the database and then attached the data files with no ldf file. That way a fresh ldf file is created and you will not have any log history.
That is absolutely horrid advice.
The database is in recovery, that means it was not cleanly shut down. If he were to do as you suggest, SQL would not be able to create a new log file (if can only do that when the database was cleanly shut down prior to the deletion) and the attach script you recommended will fail.
Hence, following your advice will turn this from an attached database in recovery to a database file that will not attach at all. Hardly an improvement.
(yes, it's possible to hack the DB back in and attempt an emergency mode repair. I say attempt, because it does not always succeed. Even if it does succeed, it will very likely leave the DB transactionally inconsistent, referentially inconsistent, potentially even structurally inconsistent)
Deleting a database's log file is a very good way of destroying that DB beyond any ability to recover (except via restoring backup)
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass