Database Restore Problem

  • Dear,

    From SQL Server 2012, I am taking a backup of a database which meets SQL Server 2008 (100) compatability level and trying to restore that backup in a database of SQL Server 2008 R2.

    But it throws an error message stating that "Specific Cast is not valid". If I try to see the backup contents, it throws another message "object cannot be cast from DBNull to other types".

    So, I can not restore backup. Please help me.

    Thanks

    Akbar

  • You cannot restore down-version.

    A database attached to a SQL 2012 server is a SQL Server 2012 database and cannot be restored to a SQL 2008 R2 server.

    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
  • Thanks for your quick response. I have two more queries.

    a) Then what does "Compatability Level" do here?

    b) And what to do in this scenario?

    Thanks.

  • As the Technet article http://technet.microsoft.com/en-us/library/bb510680(v=sql.120).aspx states:

    "Sets certain database behaviors to be compatible with the specified version of SQL Server"

    It alters how certain aspects of the DB behave, not the structure of the DB.

  • shohelr2003 (12/23/2014)


    a) Then what does "Compatability Level" do here?

    Change the behavior of the query processor

    b) And what to do in this scenario?

    Restore to a 2012 server, or script and recreate the DB on SQL 2008

    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 (12/23/2014)


    shohelr2003 (12/23/2014)


    a) Then what does "Compatability Level" do here?

    Change the behavior of the query processor

    b) And what to do in this scenario?

    Restore to a 2012 server, or script and recreate the DB on SQL 2008

    Special Thanks to you. I got the solution.

Viewing 6 posts - 1 through 5 (of 5 total)

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