Problem attaching adventureworksLT(sql server 2005)databases to sql server 2008

Proposed Answer Problem attaching adventureworksLT(sql server 2005)databases to sql server 2008

All Replies

  • Friday, January 22, 2010 5:35 PM
    Moderator
     
     Proposed Answer

    The first thing to check is the read/write property of the AdventureWorksLT.mdf and .ldf files in the folder in which you placed them.

    The second thing to check is permissions on the files. Starting with SQL Server 2005, permissions are modified on the database files whenever they are detached or backed up and are restricted to the account that executed the detach or backup statement.  This is described in the Books Online topic "Security Data and Log Files (http://msdn.microsoft.com/en-us/library/ms189128.aspx.  It could be that the service account for your instance of SQL Server 2008 does not have permissions on the folder or files.  The account must have at least Read permissions the files.  If you're not sure what the account name is go to the SQL Server Configuration Manager tool.

    Regards,
    Gail


    Gail Erickson [MS] This posting is provided "AS IS" with no warranties, and confers no rights
  • Sunday, July 04, 2010 5:51 PM
    Moderator
     
     Proposed Answer

    The error message indicates that the AdventureWorksLT database files are set to read-only.  Therefore, the first thing to check is the read/write property of the files.  This involves the following steps:

    1. From Windows Explorer, navigate to the location of the AdventureWorksLT database files. The default location is the DATA folder under C:\Program Files\Microsoft SQL Server. 

    2. Right-click the AdventureWorksLT_Data.mdf file and select Properties.  If the Read-Only attribute is checked, clear the check box and click OK.  Repeat this step for AdventureWorksLT_LOG.ldf and try the attach process again.

    If the files were not set to read-only, then the next thing to check is which accounts have permissions on the files. It could be that the service account for your instance of SQL Server 2008 does not have permissions on the folder or files.  The account must have at least Read permissions on the files.  If you're not sure what the account name is go to the SQL Server Configuration Manager tool.

     


    Gail Erickson [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights
  • Thursday, November 18, 2010 6:36 PM
     
     
    hi.I think you should copy .mdf and .ldf files in folder which you installed sql server.