Separate Tenant From Multitenant Azure SQL Database RRS feed

  • Question

  • We have an Azure SQL Database with multiple tenants identified by an ID column on each table.  What is the best approach to accomplishing this task?  We have created a copy of the database and are deleting the other tenant data.  This approach takes too long.  Is there a better way to copy the database with only the required tenant data?
    • Edited by Circle1One Thursday, June 13, 2019 9:36 PM
    Thursday, June 13, 2019 9:34 PM

All replies

  • I cannot comment on this without knowledge of your schema, data volumes etc. It could get more complex if  referential integrity is enforced.

    Are you trying to implement a database per tenant pattern?

    Monday, June 17, 2019 1:10 PM
  • The database is ~350GB with foreign keys, including self-referencing foreign keys.  Let me know what other information will help.   Thank you.
    Monday, June 17, 2019 5:13 PM
  • How about creating two new SQL databases, then export each tenant's data into their respective new database?  Then once the process is complete and verified, take the original shared database offline.

    Just a thought and a different approach.

    Bill Blakey

    Tuesday, June 18, 2019 9:57 PM