locked
migration from SQL server 2008 to 2012, RRS feed

  • Question

  • Error 5120,
    Attach database failed for Server 'TELESQL'.  (Microsoft.SqlServer.Smo)

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



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

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

    Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\teleinfra.ProtechtMedia". Operating system error 2: "2(The system cannot find the file specified.)".
    A file activation error occurred. The physical file name 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\teleinfra.ProtechtMedia' may be incorrect. Diagnose and correct additional errors, and retry the operation.
    Could not open new database 'teleinfra'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5120)

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

    ------------------------------
    BUTTONS:

    OK
    ------------------------------
    Friday, July 10, 2015 7:04 AM

Answers

  • Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\teleinfra.ProtechtMedia". Operating system error 2: "2(The system cannot find the file specified.)".

    Is your database file really without file extention like .MDF?

    Did you an in-place or side-by-side Migration? By your attempt to attach the database I guess side-by-side or new machine? MSSQL10 is default folder Name of SQL Server 2008, for SQL Server 2012 it is MSSQL11 instead; so check for the correct folder & file name.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, July 10, 2015 7:17 AM

All replies

  • Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\teleinfra.ProtechtMedia". Operating system error 2: "2(The system cannot find the file specified.)".

    Is your database file really without file extention like .MDF?

    Did you an in-place or side-by-side Migration? By your attempt to attach the database I guess side-by-side or new machine? MSSQL10 is default folder Name of SQL Server 2008, for SQL Server 2012 it is MSSQL11 instead; so check for the correct folder & file name.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Friday, July 10, 2015 7:17 AM
  • Hi Viresh,

    Could you explain the problem in detail?

    From description the data file name for your database does not look correct.

    Kindly check and explain what steps you performed.

    Friday, July 10, 2015 7:25 AM
  • Try use backup and restore will safer.

    as per Olaf said take precautions and check full permission on folder.


    Vote As Helpful if it helps to solve your issue

    Friday, July 10, 2015 7:29 AM