Reputation: 1921
I'm running 3 web apps (for different customers) which each run a separate database instance. Two apps need a database with less than 2GB storage each, and the third app requires about 10GB of storage.
Looking at the SQL Azure database plans, I can use the "Basic" plan for the first two, but I need to get the Standard S0 for the third. This gives me up to 250GB of storage, which leaves a lot of excess capacity. Is there a way I can utilize the S0 database for my other two apps while still maintaining separate logical database instances?
Upvotes: 0
Views: 194
Reputation: 852
This isn't a programming question strictly, but it would influence how you connect to your database. You could use an elastic pool, which the other answer referenced. Another option would be to create a table for each and give permissions only on the applicable table for each application login within an S0. There may even be other approaches to solving this problem - like row level security.
Really, you're considering moving from a single tenant to a multi-tenant model: here's a resource that examines this for SaaS built on SQL.
Upvotes: 0
Reputation: 11
Yes, you can - this is called Azure Elastic Pools https://learn.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool
Upvotes: 1