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:
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.
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?
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?
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.
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?
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.
Indeed, it was dbo permission missing. Thanks for the hint!
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:
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.
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?
Do you now have two sets of tables in your database?
I don't know what you are asking about
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?
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.
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.
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
is working on a reply...