• erico (8/27/2016)


    The Detach/Attach operation might be doable going across different versions from operation standpoint, but it is very important to have compatibility modes in sync from the perspective of database integrity. Good thing you resolved to changing the compatibility mode, that ensures that erroneous results will not creep in when running queries or doing other such operations due to a faulty compatibility mode setting.

    Huh? Detach/attach and backup/restore both leave the DB in the compat mode that it was when backed up/detached.

    From a troubleshooting perspective, it could be more efficient and faster for example to "detach" a database with a overblown/corrupt log file and "attach" it back using a SINGLEFiLE option, which restores the data file(s) and recreates the log.

    And sometimes leaves the database unusable and irreparable. Detaching and deleting the log file IS NOT EVER a good thing to do. It's definitely not how you deal with large log files.

    And if the you have a corrupt database you might not be able to backup the database in the first place.

    And if you detach a corrupt database, the chance of being able to attach it again is rather small.

    Not that either has much to do with SQL upgrades.

    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