Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jake williamson 207 posts 872 karma points
    Jun 25, 2017 @ 15:51
    jake williamson
    0

    how to move an umbraco sql server 2014 database to sql server 2012?!

    ok, i'm seriously kicking myself for this... can't quite believe i've done it but here go...

    i've build an umbraco site 7.6.3 and done all my content population locally using a sql server express 2014 database.

    today was the day to put it live. i created a database back up and went to restore on my host and...

    they're running sql server 2012. i know right, i should've checked. i know i should've but i didn't. it is 2017 after all.

    the only way i know to downgrade a database is to script the schema and data out but this just doesn't seem to be possible with umbaco databases. everything i've tried fails (loads of foreign key constraint errors).

    the only options i can see are:

    1 - buy courier (not an option!)

    2 - push the site live, spin it up, let the installer create the umbraco database schema, use usync to create the doctypes etc and then recreate ALL the content (which will take quite a while).

    so i thought i'd check to see if anyone else has done this and managed to dig themselves out of the hole?!

    cheers,

    jake

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 25, 2017 @ 21:12
    Alex Skrypnyk
    103

    Hi Jake

    I had the same issue and I made migration from newest SQL server to lowest with SqlCeToolbox Visual Studio extension, try it - https://github.com/ErikEJ/SqlCeToolbox

    It's free and easy to use, just move your database from SQL Server 2014 to SQLCE, then from SQLCE to SQL Server 2012 - it should be much easier then scripts and stuff like that.

    Hope it will help you.

    Thanks,

    Alex

  • jake williamson 207 posts 872 karma points
    Jun 25, 2017 @ 22:26
    jake williamson
    1

    hi alex,

    you sir are a certified genius - worked like a charm!

    i bashed my head against the wall trying all sorts of solutions for about 3 hours this afternoon..

    with the extension you suggested it took about 10 minutes from reading your post to having a sql server 2012 database restored and ready to go - amazing!

    thanks again, i owe ya one ;)

    cheers,

    jake

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 26, 2017 @ 08:08
    Alex Skrypnyk
    0

    Hi Jake

    I'm so happy to help, really cool that it helped! I had the same problem with SQL migrations(hate this stuff, migrate databases different versions not funny) and solution was found accidentally :)

    Thanks,

    Alex

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Jun 26, 2017 @ 08:32
    Paul Wright (suedeapple)
    0

    You could have created an umbraco package with your doctypes, and main content node. And reimported it on a blank 2012 db

    But the sqlce approach looks cool :)

  • Michael Harper 23 posts 134 karma points
    Oct 13, 2018 @ 08:05
    Michael Harper
    0

    This tool is a life saver - had exactly the same issue (SQL sever version mismatch)

    I tried a schema + data script created by SSMS but got tonnes of constraint violations

    Doing the same thing with this tool worked perfectly!

Please Sign in or register to post replies

Write your reply to:

Draft