Yesterday I moved my database to Azure and I started having problems with Merchello.
Previously when my database was on a different host or locally everything was running fine. But when I migrated my database to Azure I get an error.
Also, when I go in the admin section of Merchello, it is throwing errors, it can't read the Merchello version, the content tree, etc.
It seems like Merchello can't access the Azure database anymore, but everything else in the Umbraco Backoffice works. I can create documents, users, make updates etc.
Merchello Version 1.14.2
Umbraco version 7.4.0
I did a schema and data compare of the two databases, the azure and the local one, and they are identical.
Is there some setting I need to set when moving to Azure to make Merchello work again?
The "merchCustomer" is a table name - is it present in the Azure Database? When you ported the database, is the new owner of the database tables the same as the Umbraco tables (like dbo)?
There should not be any special steps to get Merchello to work. We're using the same connection string as Umbraco, so same auth credentials. I've personally moved it quite a few times without issue.
It also works in the UaaS environments (also SqlAzure). If your schema's match, my guess is there is a permissions issue on some (or all) of the Merchello tables.
I first created the db locally, then uploaded it on my dev server. Over there I installed Merchello and the new tables that were created were created under a different schema, not the dbo schema. That was all good and working at that host, but when I switched to Azure it didn't like that my Umbraco tables were under the dbo schema and my Merchello tables were under a different schema.
I had to change the schema of the Merchello tables to be dbo and that fixed it.
Thanks for replying with your fix. I've done that before myself and have got myself in the habit of always setting my local db user to dbo - some DBAs hate this =).
It turned out it's not quite fixed yet. I'm able to use the Merchello admin to create new products so the website now actually communicates with the merchello db tables. But I'm having trouble creating invoices and orders through code.
My code executes without an error in the frontend or in the logs, but no invoice or order is created in the db. I had to add in a few lines of code to generate the invoice key as well as the invoice item, order and order item keys because it was thrown exceptions.
When I switch the database and use the one that is hosted on my other host (not on azure) this code works fine, I even don't need to generate any keys and the invoice number is populated correctly.
I rebuilt the Examine indexes thinking it may help but it didn't.
I tried to look for some db functions or triggers that may be missing and causing this but it doesn't look like Merchello uses them.
Also, this piece of code for creating a product works:
Product pr = (Product)MerchelloContext.Current.Services.ProductService.CreateProduct("Test from code", "skuuuuu", 1);
MerchelloContext.Current.Services.ProductService.Save(pr);
But this one for creating an invoice and an order doesn't.
Merchello stopped working when db moved to Azure
Yesterday I moved my database to Azure and I started having problems with Merchello.
Previously when my database was on a different host or locally everything was running fine. But when I migrated my database to Azure I get an error.
Also, when I go in the admin section of Merchello, it is throwing errors, it can't read the Merchello version, the content tree, etc.
It seems like Merchello can't access the Azure database anymore, but everything else in the Umbraco Backoffice works. I can create documents, users, make updates etc.
Merchello Version 1.14.2 Umbraco version 7.4.0
I did a schema and data compare of the two databases, the azure and the local one, and they are identical.
Is there some setting I need to set when moving to Azure to make Merchello work again?
The "merchCustomer" is a table name - is it present in the Azure Database? When you ported the database, is the new owner of the database tables the same as the Umbraco tables (like dbo)?
There should not be any special steps to get Merchello to work. We're using the same connection string as Umbraco, so same auth credentials. I've personally moved it quite a few times without issue.
It also works in the UaaS environments (also SqlAzure). If your schema's match, my guess is there is a permissions issue on some (or all) of the Merchello tables.
Thanks Rusty. Your answer helped me fix it.
The problem was this:
I first created the db locally, then uploaded it on my dev server. Over there I installed Merchello and the new tables that were created were created under a different schema, not the dbo schema. That was all good and working at that host, but when I switched to Azure it didn't like that my Umbraco tables were under the dbo schema and my Merchello tables were under a different schema. I had to change the schema of the Merchello tables to be dbo and that fixed it.
Thanks for replying with your fix. I've done that before myself and have got myself in the habit of always setting my local db user to dbo - some DBAs hate this =).
Hey Rusty
It turned out it's not quite fixed yet. I'm able to use the Merchello admin to create new products so the website now actually communicates with the merchello db tables. But I'm having trouble creating invoices and orders through code.
My code executes without an error in the frontend or in the logs, but no invoice or order is created in the db. I had to add in a few lines of code to generate the invoice key as well as the invoice item, order and order item keys because it was thrown exceptions.
When I switch the database and use the one that is hosted on my other host (not on azure) this code works fine, I even don't need to generate any keys and the invoice number is populated correctly. I rebuilt the Examine indexes thinking it may help but it didn't.
I tried to look for some db functions or triggers that may be missing and causing this but it doesn't look like Merchello uses them.
Also, this piece of code for creating a product works:
But this one for creating an invoice and an order doesn't.
Thanks for your time. I really appreciate it. If there is some way to repay you back, please tell me.
is working on a reply...