The question is in the subject :-) but for background:
I'm working on a multi-tenancy website portal for our business partners. Each partner organisation we grant access to gets their own sql database for their own data. which is a copy of a template baseline database.
The idea is that when an agreement is made with a partner the details are entered into one of our internal systems and this publishes a message via nginn to the portal which then makes a copy of the template database and performs all the provisioning steps you would imagine.
I am copying the database by backing up and restoring the template database.
I've built a prototype using the message bus and realised that my I cannot run backup and restores inside of a transaction which is a problem because nginn starts a transaction before my handler is called.
Usually the nginn transaction policy is exactly what I need but for this particular case it is caught me out.
Any Ideas?