Copied to clipboard

Flag this post as spam?

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

  • Burichan 17 posts 129 karma points
    Nov 25, 2016 @ 13:23

    Hello everybody, l created an empty project and later installed Umbraco. In Umbraco DB configuration during installation I sellected SQLExpress.

    Then I published my project to a repo in BitBucket, and afterwards tried to clone it to my other PC. After I reloaded NuGet packages and built my solution to my other PC, I tried to run it but I got this error:

    "Umbraco cannot start. A connection string is configured but the Umbraco cannot connect to the database"

    My connection string in Web.config is:

        <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />

    What should I do? I want to have separate DBs for each PC.

    Be soft at me, I'm a junior developer with minimal knowledge on databases!

    Thanks, Burichan

  • Shaun 248 posts 475 karma points
    Nov 25, 2016 @ 14:27

    You'll need to make a backup of your database, from sql express SSMS. That will create a .bak file

    You then need to copy that .bak file into your git repository for the relevant site and push changes.

    Then when you clone the repository in future you'll be able to pull the .bak file and restore the database on the new machine

  • David Brendel 774 posts 2843 karma points c-trib
    Nov 25, 2016 @ 16:22
    David Brendel

    Hi Burichan,

    the connection string configured is for a sqlce database as it points to the APP_data folder.

    If you really want to have a seperate database on both machines you have to get umbraco run through the installation again. For this remove the conection string and the version number in the web.config. Then umbraco thinks it wasn't installed yet.

    But with this you loose every created document type and so on.

    Is there a special reason to have a different database on each machine?

    Regards David

Please Sign in or register to post replies

Write your reply to: