- Download AdventureWorks from here
- Run below script
CREATE DATABASE AdventureWorks2012
ON (FILENAME = 'D:\SQL\AdventureWorks2012_Data.mdf')
FOR ATTACH_REBUILD_LOG ;
You will see below message and you are DONE after running above script!
File activation failure. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf" may be incorrect.
New log file 'D:\SQL\AdventureWorks2012_log.ldf' was created.
Converting database 'AdventureWorks2012' from version 705 to the current version 706.
Database 'AdventureWorks2012' running the upgrade step from version 705 to version 706.