Copied to clipboard

Flag this post as spam?

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


  • nickornotto 403 posts 907 karma points
    Jul 28, 2022 @ 04:11
    nickornotto
    0

    Migrate db to production - production site not picking up the imported db

    We are trying to migrate the v10 database to production.

    We have exported the db from local and imported on production server via SSMS.

    Yet on production the site is trying to install the site again.

    The database definitely exists.

    Even if we go ahead with the installation - it just overrides the existing database (the db we imported from local).

    Can someone explain to me what's going on? And if there are any particular recommendations to migrate the v9 or v9 database?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 28, 2022 @ 05:14
    Huw Reddick
    100

    It could be a dB ownership issue with SQL. Ensure the user in your connection string has the dbo role assigned.

    This kind of thing happens if the database is created by a different user than the one in your connection.

  • nickornotto 403 posts 907 karma points
    Jul 28, 2022 @ 18:51
    nickornotto
    0

    Indeed, it was dbo permission missing. Thanks for the hint!

  • nickornotto 403 posts 907 karma points
    Aug 18, 2022 @ 04:49
    nickornotto
    0

    We are trying to do it on another site and this time the permissions are assigned, the conn string is correct on live and it still doesn't work.

    So we did install online of the site (following the wizard) however it didn't let us to input the connection string (I'm assuming this is because the conn string existed in our config already) so (I also assume) it has ovewritten our database.

    The result is that:

    1. The user in the deployed database received the date of creation exactly at the time of the installation so it looks like it's been overwritten by the instalation online.

    2. The tables still have the content of our pre-exisiting (deployed) databse yet the cms does not show ANY content that is in the database.

    I honestly do not know what's going on, can someone explain to me?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Aug 18, 2022 @ 06:38
    Huw Reddick
    0

    Do you now have two sets of tables in your database?

  • nickornotto 403 posts 907 karma points
    Aug 18, 2022 @ 06:58
    nickornotto
    0

    I don't know what you are asking about

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Aug 18, 2022 @ 07:29
    Huw Reddick
    0

    you say the content still exists in the database tables of your pre-existing database, so t does not look like you have overwritten anything.

    How do you know it still contains the data? did you look in the database from sql manager? if so, does it look like there are two copies of every table but with a different prefix?

    like dbo.tablename and xxx.tablename, where xxx is possibly your sql username?

    If that is not the case then perhaps it has set itself up using a new local db connection.

    Check in both appsettings.json and web.config to see what connection string is being used,is it pointed at the correct database?

  • nickornotto 403 posts 907 karma points
    Aug 18, 2022 @ 07:33
    nickornotto
    0

    Oh yes, that's the case, I've just noticed it. Does it mean that the user does not have dbo permissions?

    It is pointing to the correct database.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Aug 18, 2022 @ 07:40
    Huw Reddick
    0

    yes, the user is not dbo, so it will have created a new set of tables using the username as tthe schema.

    If you make your user owner of dbo schema, you can delete all the non dbo tables and umbraco should happily pick up your existing tables without creating a new set.

  • nickornotto 403 posts 907 karma points
    Aug 18, 2022 @ 11:17
    nickornotto
    0

    Ok, it looks like the default schema for my db user is not dbo, I'll change this and will see if it starts working. Thanks

Please Sign in or register to post replies

Write your reply to:

Draft