November 1, 2013 at 9:04 am
Hi,
Please suggest where can I find Adventure Works DW 2008R2 database. I tried few downloads from codeplex but not able to attach the file.
Note : Whenever the download is in Zip format. I unzip it and try to attach both mdf and ldf file, it throws an error "Unable to open physical file".
Regards
Jim
November 1, 2013 at 9:14 am
try this (make sure to change the InstanceName to your instance name:
USE [master]
GO
EXEC sp_configure filestream_access_level, 2
RECONFIGURE;
go
CREATE DATABASE [AdventureWorks2008] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\DATA\AdventureWorks2008_Data.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\DATA\AdventureWorks2008_Log.ldf' ),
FILEGROUP [PRIMARY] CONTAINS FILESTREAM DEFAULT
( NAME = N'Documents', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\DATA\Documents' )
FOR ATTACH
GO
Make sure you are not on your production system since you will be enabling filestream.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply