Unable to attach a database

  • I did a clean install of windows Vista Business.

    I installed Visual Studio 2008 Professional and SP1 for Visual Studio.

    I then installed SQL Server 2008 Express Adv. using the Web Installer wpilauncher_n

    from Microsoft.

    When I try to attach my database I get the following error.

    TITLE: Microsoft SQL Server Management Studio

    ------------------------------

    Attach database failed for Server 'TERESA-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

    ------------------------------

    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------

    Unable to open the physical file "C:\Visual Studio 2008\Projects\LabReports Database\LabReports_log.ldf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

  • The error's pretty clear

    robblot (1/22/2010)


    Unable to open the physical file "C:\Visual Studio 2008\Projects\LabReports Database\LabReports_log.ldf". Operating system error 5: "5(Access is denied.)".

    SQL does not have permission to access the log file. Either move it to somewhere where SQL does have permission, or change the permissions on that folder and file so that the SQL server service account has full rights.

    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

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply