NHibernate not compatible with SQL Azure, suggest adding a new 'SqlAzure' database provider using MS library


Using SQL Azure for my DB, everything was apparently ok.
But after some days filling the site, I experienced problems with taxonomies: when deleting or changing values, the database was not perfectly cleaned (found lot of TermPart values with NULL values).
Initially I put the blame on SysCache and disabled the module, but more investigations lead me to the fact that SQL Azure could request some transactions being resent after a special return code, some actions could also be delayed before being applied.
I found this library from GitHub: NHibernate.SQLAzure which deals with this problem for version 3.3.2 of NHibernate, using the dedicated SQL Azure Microsoft Transient Fault Handling library to allow for reliable SQL Azure connections.
According the author it behaves normally when using usual DB, only entering in action when SQL Azure is the DB.
I suggest to test and include it into Orchard distri 1.7 if OK.
Here are the links:



I have created a new provider for this kind of db and changed some pages, but it need some checking...see attached file and http://orchard.codeplex.com/discussions/405128

file attachments


CSADNT wrote Dec 3, 2012 at 5:10 PM

this implementation seems to be running ok...

CSADNT wrote Dec 10, 2012 at 10:25 AM

Nop....my implementation is not called, it was the Sql Server DataServices Provider which was used by Orchard.
I don't know how to add my SqlAzure data service provider in the list built by Orchard on the start in its blueprint list ????

sebastienros wrote Dec 11, 2012 at 8:42 PM

Need to investigate. Will try to repro with Taxonomies.

CSADNT wrote Jan 13, 2013 at 11:35 PM

There was a 'public' missing before the class name for my implementation the SqlAzure Service....I was running on normal Sql, as it is the default service, and was puzzled by some sql error..... It now works ok, The SqlAzure service being normally identified by autofac, I would like to do a pull request for my code ?

sebastienros wrote Jul 6, 2013 at 11:37 PM

Fixed in changeset 6be2180a2672

sebastienros wrote Jul 6, 2013 at 11:40 PM

Please check if it's working for you and you like the implementation better.

BTW are you using 1.x on azure ?

CSADNT wrote Jul 7, 2013 at 6:05 AM

I was but I rollback to classic sql server for orchard, thinking it would never be implemented, i was also using it on azure web site which proved not stable for me. So migrated from aws+sql azure to azure vm +sql server Enterprise...but i still use sql azure on another side of m'y project,: very efficient and costless.
I will have a look and give another try to aws with sqla + orchard 1.7.

sfmskywalker wrote Mar 28 at 1:28 AM

Fixed in changeset 5fbd15261a6b9054345af90150bb2e5c4ed90179