Ever had a situation where you had to attach a database when all you had were the data files? Perhaps when you downloaded the AdventureWorks sample databases from CodePlex? Here's a script to attach a database with just the data files using CREATE DATABASE....ATTACH_REBUILD_LOG statement
CREATE DATABASE [AdventureWorks]
ON PRIMARY ( NAME = N'AdventureWorks_Data',
FILENAME = N'E:\SQL Databases\AdventureWorks\AdventureWorks_Data.mdf',
SIZE = 3072KB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 1024KB )
Refer my post: http://beyondrelational.com/modules/2/blogs/77/posts/15581/0176-sql-server-creating-a-database-without-the-log-backup-file-error-msg-5120.aspx for more details.