Database attach issue

  • 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,

  • post your statement that you are using to attach database!!!


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • 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

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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!!!


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • the link bellow, can help you too!!!

    http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/f10908f9-5beb-4686-9f64-b4fa1ad1abd3


    [font="Times New Roman"]rfr.ferrari[/font]
    DBA - SQL Server 2008
    MCITP | MCTS

    remember is live or suffer twice!
    the period you fastest growing is the most difficult period of your life!
  • 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