Hello all. Could someone please help me. I am new to SQL and trying to follow a book instruction to create a practice DB in SQL Server 2014. The book instructs me to run the script below.
CREATE DATABASE AdventureWorks2012 ON (FILENAME = '{drive}:{file path}\AdventureWorks2012_Data.mdf')
FOR ATTACH_REBUILD_LOG
So I typed the following in SQL Server 2014 Query Window;
CREATE DATABASE AdventureWorks2012 ON (FILENAME = '{D}:{SQL Server Management Studio\Downloads\AWSampleDB}\AdventureWorks2012_Data.mdf')
FOR ATTACH_REBUILD_LOG
and I get the error below
Msg 5105, Level 16, State 2, Line 1
A file activation error occurred. The physical file name '{D}:{SQL Server Management Studio\Downloads\AWSampleDB}\AdventureWorks2012_Data.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.
I tried removing the brackets and single quotes but no luck. Any help would be kindly appreciated. Thank you!