July 2, 2011 at 8:36 pm
Hi All,
I want to attach old copy of Adventurework2008 database for MCTP 70-433 exam from Microsoft book.
When i try to attach i get following error.
Msg 5120, Level 16, State 105, Line 1
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents". Operating system error 2: "2(failed to retrieve text for this error. Reason: 1815)".
Msg 5105, Level 16, State 14, Line 1
A file activation error occurred. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents' may be incorrect. Diagnose and correct additional errors, and retry the operation.
Msg 1813, Level 16, State 2, Line 1
Could not open new database 'AdventureWorks2008'. CREATE DATABASE is aborted.
I have already tried options available in following Microsoft discussion link but that didn't help in my case
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/a6879c50-fce3-494c-81e4-ce6ebcb8191c
Cheers,
July 2, 2011 at 8:56 pm
post your statement that you are using to attach database!!!
July 3, 2011 at 12:34 am
I am using Attach Database wizard. but cab be scripted to as follows.
USE [master]
GO
CREATE DATABASE [AdventureWorks2008] ON
( FILENAME = N'C:\AdventureWorks2008\AdventureWorks2008_Data.mdf' ),
( FILENAME = N'C:\AdventureWorks2008\AdventureWorks2008_Log.ldf' )
FOR ATTACH
GO
July 3, 2011 at 3:37 am
You need to point the filestream directory somewhere too (and ensure that filestream is enabled)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 3, 2011 at 6:00 pm
GilaMonster (7/3/2011)
You need to point the filestream directory somewhere too (and ensure that filestream is enabled)
i agree with Gail!!!!
like database is sample for training, is necessary to ensure that filestream on instance is enabled!!!!!
this link http://technet.microsoft.com/en-us/library/ms176061.aspx on sample I (last sample) contains filestream create!!!
July 3, 2011 at 6:04 pm
the link bellow, can help you too!!!
July 5, 2011 at 7:24 am
After enabling files stream . Now i get following message which doesn't make sense to me at all...
-----------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Unable to open the physical file "C:\AdventureWorks2008\AdventureWorks2008_Data.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply