Results 1 to 4 of 4

Thread: [RESOLVED] Attach Database MS Sql

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2012
    Posts
    119

    Resolved [RESOLVED] Attach Database MS Sql

    I had two versions of SQLEXPRESS on my computer earlier ,now I have uninstalled 2012 SQLEXPRESS from my computer
    Now when I try to attach .MDF file made in 2012 version it gives me error.

    Code:
        TITLE: Microsoft SQL Server Management Studio
        ------------------------------
        Attach database failed for Server 'My-PC\SQLEXPRESS'. (Microsoft.SqlServer.Smo)
        For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1750.9+((dac_inplace_upgrade).101209-1051+)&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)
        ------------------------------
        The database 'C:\USERS\Fullpath\PAY.MDF' cannot be opened because it is version 706. This server supports version 655 and earlier. A downgrade path is not supported.
        Could not open new database 'C:\USERS\Fullpath\PAY.MDF'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)
        For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=948&LinkId=20476
        ------------------------------
        BUTTONS:
        OK
        ------------------------------
    Is there any way to do that without installing back the 2012 version ..Currently I'm running on 2008 version.

    Thanks in advance.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: Attach Database MS Sql

    If the database was created in 2012 format then it's not going to work with older versions. You can attach an older file to a newer instance but not vice versa, for obvious reasons.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2012
    Posts
    119

    Re: Attach Database MS Sql

    ok so I have to install 2012 version back again ....thanks for the help

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: Attach Database MS Sql

    Quote Originally Posted by chdboy View Post
    ok so I have to install 2012 version back again ....thanks for the help
    Once you've reinstalled 2012 and reattached the database, you can downgrade it so that it can then be attached to an older version and reuninstall 2012. I've never actually tried this but I think that you should be able to go into the database properties and set the Compatibility Level option appropriately and then detach and attach to the older version instance. If that doesn't work then you could generate scripts to recreate the database from scratch and run those against and older instance.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width