Copied to clipboard

Flag this post as spam?

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


  • Stief Dirckx 43 posts 76 karma points
    Apr 08, 2017 @ 14:06
    Stief Dirckx
    0

    Migrating to Umbraco Cloud not working for full SQL database

    I'm trying to migrate an existing website to Umbraco Cloud by following these steps from the documentation: https://our.umbraco.org/documentation/Umbraco-Cloud/Deployment/Migrate-Existing-Site/

    The site uses a full SQL Server database so step 9 says to set the connection string in de web.config, which I did.

    When running the local cloud project I first got an error about a mismatch in assembly versions for System.Data.SqlServerCe. But I could fix it with this solution: https://our.umbraco.org/forum/using-umbraco-and-getting-started/80886-could-not-load-file-or-assembly-systemdatasqlserverce-version-4000

    Everything looked fine then, my site worked properly and in the backoffice I could see my content. But then I noticed the Umbraco Cloud user was not added to my database. This is explained in the third point of step 9 and step 11.

    I investigated further to see what could be the problem and then I noticed suddenly there was an umbraco.sdf file in the App_Data folder. Not really what was expected.

    I repeated the whole process and the first error about the assembly versions also mentioned Umbraco.Courier.Persistence.UmbracoDbHelper.CreateSqlCeDatabase(String connectionString). So for some reason Courier still tries to use SQL CE although my web.config says not to.

    My connection string is:

    <add name="umbracoDbDSN" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DebraBelgium;Integrated Security=SSPI;" providerName="System.Data.SqlClient" />
    

    What am I doing wrong?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 10, 2017 @ 16:19
    Dennis Aaen
    1

    Hi Stief,

    Sorry to hear that you have some issue by moving a site to Umbraco Cloud.

    Could you please try to see this session from last years CodeGaden 16 where Per is showing how to move a site to Umbraco Cloud when it uses a SQL database. https://vimeo.com/channels/codegarden16/183479448

    Hope this helps,

    /Dennis

  • Stief Dirckx 43 posts 76 karma points
    Apr 10, 2017 @ 17:41
    Stief Dirckx
    0

    Hi Dennis

    Yes I did, it follows more or less the same steps as the migration documentation.

    But after starting the site for the first time after cloning with the connection string pointing to my existing database Courier still creates an extra SQL CE database.

    I now found a solution by converting my full SQL database to an SQL CE database before migrating.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    May 01, 2017 @ 07:47
    Sebastiaan Janssen
    0

    You can keep using SQL Server (non-CE). Yes, we will create a (blank!) CE database during this process automatically, it should be about 768KB in size. This is normal.

    The error you get is because you have a different version of CE installed on your machine. This is normal. You can add assembly redirects in your web.config as you found out - great!

    So at step 11 you should have a working site on localhost, correct? It should look just like your old site. If the cloud user was not added, make sure to follow this step:

    To add any of these users to the site simply rename the files by removing the leading underscore.

    So go into /data/backoffice/users/ - find your cloud user file (for example [email protected]) and remove the leading underscore (so: rename to [email protected]).

    Then go back into the data folder and create the deploy marker again (echo > deploy). Once you load something in your site, this deploy marker should get picked up and the user will be created in your database. This will rename the user file back to [email protected] with the leading underscore. If that for some reason did not work then you will find a deploy-failed marker in the data folder, the content of that file will tell you something about what went wrong.

  • Stief Dirckx 43 posts 76 karma points
    May 01, 2017 @ 18:08
    Stief Dirckx
    0

    I can't reproduce right now because I continued the migration with a database converted to CE.

    Within a couple of weeks I'll probably migrate another site to the cloud. I'll then try the procedure once more.

  • Glenn Smith 18 posts 99 karma points
    Jan 22, 2019 @ 15:21
    Glenn Smith
    0

    I am having the same issue. I previously created a simple local Umbraco project using SQL Server and wanted to upload it into the Umbraco Cloud as a proof of concept and ran into the same issue. I reviewed the video recommended above: https://vimeo.com/channels/codegarden16/183479448, but could not find any guidance pertaining to uploading an existing Sql server database instance of Umbraco. The best I can figure is that I need to convert the SQL Server database into a CE instance and try uploading the CE database version.

Please Sign in or register to post replies

Write your reply to:

Draft