Download from http://sqlserversamples.codeplex.com website AdventureWorks2012_Data.mdf file. I copy this file into backup folder of SQL Server 2012 path.
Copy this script. Your path may be other, so change it for yours.
CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Backup\AdventureWorks2012_Data.mdf') FOR ATTACH_REBUILD_LOG ;
Paste this code into query window and run it by means of Execute tool.
I f you see in tree of databases, you see new AdventureWorks2012_Data database.
In backup folder in this time you see new log file: